diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 4823bb6d03c834..6e43cf46167d78 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -357,6 +357,8 @@ DCONF DCONFIG debianutils debugText +decrypt +decrypted DEDEDEDE deepnote DefaultOTAProviders @@ -1151,6 +1153,7 @@ RPC RPCs RPi RPis +RSA rsn RSSI RST diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 42dba7ca4485aa..671eb2a7c5a47f 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.7.3 + image: connectedhomeip/chip-build:0.7.16 options: --user root steps: @@ -71,7 +71,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.7.3 + image: connectedhomeip/chip-build-esp32:0.7.16 options: --user root steps: @@ -107,7 +107,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.7.3 + image: connectedhomeip/chip-build-nrf-platform:0.7.16 options: --user root steps: diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 204d3f448a1ca1..c291943771c827 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -181,17 +181,6 @@ jobs: linux debug bridge-app \ out/linux-x64-bridge/chip-bridge-app \ /tmp/bloat_reports/ - - name: Build example Dynamic Bridge - timeout-minutes: 10 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-dynamic-bridge-ipv6only \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug dynamic-bridge-app-ipv6only \ - out/linux-x64-dynamic-bridge-ipv6only/dynamic-chip-bridge-app \ - /tmp/bloat_reports/ - name: Build example OTA Provider timeout-minutes: 10 run: | diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 7f66809a2d9138..cb1c94f5915eae 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.7.3 + image: connectedhomeip/chip-build-nrf-platform:0.7.16 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -240,7 +240,7 @@ jobs: - name: Build example nRF Connect SDK All Clusters App on nRF7002 PDK timeout-minutes: 20 run: | - scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk_nrf5340_cpuapp + scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk_nrf5340_cpuapp -DCONF_FILE=prj_release.conf .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf7002dk_nrf5340_cpuapp all-clusters-app \ examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \ diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8b6f099ca15c48..8a770ecb46b6f0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -223,7 +223,3 @@ jobs: run: | git grep -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 - - name: Check that our hardcoded SHA for clang-format on ARM mac matches the pigweed SHA. - if: always() - run: | - ./scripts/lints/clang-format-version-matches.py diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index bda66ca507030b..14146339d5844b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -140,6 +140,7 @@ jobs: src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-select-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml \ @@ -154,6 +155,7 @@ jobs: src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-select-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml \ @@ -173,8 +175,11 @@ jobs: src/app/zap-templates/zcl/data-model/chip/proxy-valid-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/pwm-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-select-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml \ src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-select-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-select-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/scene.xml \ src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml \ @@ -189,6 +194,7 @@ jobs: src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/window-covering.xml \ src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \ diff --git a/BUILD.gn b/BUILD.gn index dfe6cbbf4850f3..6cc0d55261ff2b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -179,8 +179,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { deps += [ "${chip_root}/src/app/server/java", "${chip_root}/src/controller/java", + "${chip_root}/src/controller/java:onboarding_payload", "${chip_root}/src/platform/android:java", - "${chip_root}/src/setup_payload/java", ] } diff --git a/build/chip/java/config.gni b/build/chip/java/config.gni index 3e1f160da57b07..ca18c9231fef1d 100644 --- a/build/chip/java/config.gni +++ b/build/chip/java/config.gni @@ -16,7 +16,7 @@ java_path = getenv("JAVA_PATH") declare_args() { java_matter_controller_dependent_paths = [] matter_enable_java_compilation = false - if (java_path != "" && current_os != "android") { + if (java_path != "" && current_os == "linux") { java_matter_controller_dependent_paths += [ "${java_path}/include/" ] if (current_os == "mac") { diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 7c0fc01d077f8a..9a9b6e98e674ab 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -85,6 +85,10 @@ chip_gn_arg_append("esp32_cxx" "\"${CMAKE_CXX_COMPILER}\"") chip_gn_arg_append("esp32_cpu" "\"esp32\"") chip_gn_arg_bool("is_debug" ${is_debug}) +if (CONFIG_CHIP_CONFIG_IM_PRETTY_PRINT) + chip_gn_arg_bool("enable_im_pretty_print" "true") +endif() + # Config the chip log level by IDF menuconfig if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 1) chip_gn_arg_bool ("chip_error_logging" "true") @@ -384,6 +388,11 @@ if((NOT CONFIG_USE_MINIMAL_MDNS) AND (CONFIG_ENABLE_WIFI_STATION OR CONFIG_ENABL list(APPEND chip_libraries $) endif() +if (CONFIG_ENABLE_ENCRYPTED_OTA) + idf_component_get_property(esp_encrypted_img_lib espressif__esp_encrypted_img COMPONENT_LIB) + list(APPEND chip_libraries $) +endif() + idf_component_get_property(main_lib main COMPONENT_LIB) list(APPEND chip_libraries $) @@ -409,6 +418,9 @@ if (CONFIG_ESP32_WIFI_ENABLED) foreach(blob ${blobs}) list(APPEND chip_libraries "${esp_wifi_dir}/lib/${target_name}/lib${blob}.a") endforeach() + + idf_component_get_property(wpa_supplicant_lib wpa_supplicant COMPONENT_LIB) + list(APPEND chip_libraries $) endif() idf_component_get_property(esp_netif_lib esp_netif COMPONENT_LIB) diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 1611bc081e25c1..86b7381f129720 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -112,11 +112,15 @@ menu "CHIP Core" int "Set threshold in ms" default 700 help - Time threshold for warning that dispatched took too long. You can - set this default set to 0 to to disable event dispatching time - measurement and suppress the logs "Long dispatch time:...". + Time threshold for warning that dispatched took too long. You can + set this default set to 0 to to disable event dispatching time + measurement and suppress the logs "Long dispatch time:...". - # TODO: add log level selection + config CHIP_LOG_FILTERING + bool "CHIP log level filtering APIs" + default n + help + Option to enable/disable CHIP log level filtering APIs. endmenu # "General Options" @@ -186,6 +190,13 @@ menu "CHIP Core" help Enable this option to enable OTA Requestor for example + config ENABLE_ENCRYPTED_OTA + bool "Enable pre encrypted OTA" + depends on ENABLE_OTA_REQUESTOR + default n + help + Enable this option to use the pre encrypted OTA image + config OTA_AUTO_REBOOT_ON_APPLY bool "Reboot the device after applying the OTA image" depends on ENABLE_OTA_REQUESTOR diff --git a/config/esp32/components/chip/idf_component.yml b/config/esp32/components/chip/idf_component.yml index 0fa26e3c85b2a2..82c7fe3fc81338 100644 --- a/config/esp32/components/chip/idf_component.yml +++ b/config/esp32/components/chip/idf_component.yml @@ -10,3 +10,8 @@ dependencies: version: "^2.3.0" rules: - if: "idf_version >=4.3" + + espressif/esp_encrypted_img: + version: "2.0.3" + rules: + - if: "idf_version >=4.4" diff --git a/config/nrfconnect/.nrfconnect-recommended-revision b/config/nrfconnect/.nrfconnect-recommended-revision index b1d18bc43f08ca..8721bbc46ad2f7 100644 --- a/config/nrfconnect/.nrfconnect-recommended-revision +++ b/config/nrfconnect/.nrfconnect-recommended-revision @@ -1 +1 @@ -v2.3.0 +v2.4.0 diff --git a/config/nrfconnect/app/flashing.cmake b/config/nrfconnect/app/flashing.cmake index 7937d99d887799..c6c90ef0270986 100644 --- a/config/nrfconnect/app/flashing.cmake +++ b/config/nrfconnect/app/flashing.cmake @@ -40,7 +40,7 @@ add_custom_command(OUTPUT "${FLASHBUNDLE_FLASHER_PLATFORM}" VERBATIM) if (merged_hex_to_flash) - set(flashbundle_hex_to_copy "${merged_hex_to_flash}") + set(flashbundle_hex_to_copy "zephyr/${merged_hex_to_flash}") else() set(flashbundle_hex_to_copy "zephyr/${KERNEL_HEX_NAME}") endif() diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index 2511fa3094cff6..43149d2306e3c1 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -50,21 +50,16 @@ include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn_args.cmake) include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn.cmake) # Prepare compiler flags -matter_add_flags(-D_DEFAULT_SOURCE) - if (CHIP_CFLAGS) matter_add_flags("${CHIP_CFLAGS}") endif() +matter_add_flags(-D_POSIX_C_SOURCE=200809) + if (CONFIG_ARM) matter_add_cflags(--specs=nosys.specs) endif() -if (CONFIG_POSIX_API) - matter_add_flags(-D_SYS__PTHREADTYPES_H_) - matter_add_flags(-isystem${ZEPHYR_BASE}/include/zephyr/posix) -endif() - if (CONFIG_NORDIC_SECURITY_BACKEND) zephyr_include_directories($) zephyr_include_directories($) @@ -197,8 +192,12 @@ matter_build(chip DEVICE_INFO_EXAMPLE_PROVIDER ${CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER} GN_DEPENDENCIES kernel ) + set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip) -target_compile_definitions(chip INTERFACE _DEFAULT_SOURCE) +# Enable visibility of POSIX.1-2008 functions, such as strnlen +target_compile_definitions(chip INTERFACE _POSIX_C_SOURCE=200809) +# Make sure that kernel symbols that are only referenced by the Matter libraries are resolved. +target_link_libraries(chip INTERFACE $) if (CONFIG_CHIP_MALLOC_SYS_HEAP_OVERRIDE) target_link_options(chip INTERFACE diff --git a/config/nrfconnect/chip-module/Kconfig b/config/nrfconnect/chip-module/Kconfig index e5fbdb405e365d..059d5112652b3f 100644 --- a/config/nrfconnect/chip-module/Kconfig +++ b/config/nrfconnect/chip-module/Kconfig @@ -18,6 +18,14 @@ rsource "../../zephyr/Kconfig" if CHIP +config CHIP_NRF_PLATFORM + bool + default y + help + States that the configuration uses Matter nRF platform, + what can be used to conditionally deviate from Zephyr generic configuration + for nRF platform related purposes. + # See config/zephyr/Kconfig for full definition config CHIP_DEVICE_VENDOR_NAME default "Nordic Semiconductor ASA" @@ -94,7 +102,7 @@ config CHIP_MALLOC_SYS_HEAP config CHIP_FACTORY_DATA bool "Factory data provider" select ZCBOR - select FPROTECT + imply FPROTECT help Enables the default nRF Connect factory data provider implementation that supports reading the factory data encoded in the CBOR format from the @@ -127,6 +135,27 @@ config CHIP_FACTORY_DATA_VERSION this value in the factory data provider implementation to verify that the factory data saved in the flash memory has the expected version. +config CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN + int "Maximum length of rotating device ID unique ID in bytes" + default 16 + depends on CHIP_FACTORY_DATA + help + Maximum acceptable length of rotating device ID unique ID in bytes. + +config CHIP_FACTORY_DATA_WRITE_PROTECT + bool "Enable Factory Data write protection" + select FPROTECT + depends on CHIP_FACTORY_DATA + default y if CHIP_FACTORY_DATA + help + Enables the write protection of the Factory Data partition in the flash memory. + This is a recommended feature, but it requires the Settings partition size to be + a multiple of FPROTECT_BLOCK_SIZE and the Factory Data partition to be placed + right after the application partition in the address space (the Factory Data + partition offset must be equal to the last address of the application partition). + The second requirement is valid only when the FPROTECT_BLOCK_SIZE is bigger than + the flash memory page size. + if CHIP_FACTORY_DATA_BUILD # Factory data definitions diff --git a/config/nrfconnect/chip-module/Kconfig.defaults b/config/nrfconnect/chip-module/Kconfig.defaults index bf7b494e7050d5..d275d938021c63 100644 --- a/config/nrfconnect/chip-module/Kconfig.defaults +++ b/config/nrfconnect/chip-module/Kconfig.defaults @@ -37,7 +37,7 @@ config CHIP_APP_LOG_LEVEL default 4 # debug config LOG_DEFAULT_LEVEL - default 2 # warning + default 1 # error config CHIP_LOG_SIZE_OPTIMIZATION default y @@ -50,6 +50,12 @@ config PRINTK_SYNC config ASSERT default y +config ASSERT_NO_COND_INFO + default y + +config ASSERT_NO_MSG_INFO + default y + config HW_STACK_PROTECTION default y @@ -63,9 +69,9 @@ config PTHREAD_IPC bool default n -# Generic networking options -config NET_SOCKETS_POSIX_NAMES - default n +config POSIX_MAX_FDS + int + default 16 # Application stack size config MAIN_STACK_SIZE @@ -216,6 +222,10 @@ endif if CHIP_WIFI +choice WPA_SUPP_LOG_LEVEL_CHOICE + default WPA_SUPP_LOG_LEVEL_ERR +endchoice + config NRF_WIFI_LOW_POWER default n @@ -223,7 +233,7 @@ config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG default n config SYSTEM_WORKQUEUE_STACK_SIZE - default 2048 + default 2560 # align these numbers to match the OpenThread config config NET_IF_UNICAST_IPV6_ADDR_COUNT @@ -232,9 +242,6 @@ config NET_IF_UNICAST_IPV6_ADDR_COUNT config NET_IF_MCAST_IPV6_ADDR_COUNT default 8 -config NET_SOCKETS_POSIX_NAMES - default n - config NET_SOCKETS_POLL_MAX default 4 @@ -436,6 +443,9 @@ endif # SOC_SERIES_NRF52X if SOC_SERIES_NRF53X +config BOOT_IMAGE_ACCESS_HOOKS + default y + config UPDATEABLE_IMAGE_NUMBER default 2 diff --git a/config/nrfconnect/chip-module/Kconfig.features b/config/nrfconnect/chip-module/Kconfig.features index 0501e351681e9a..84390e38d2029b 100644 --- a/config/nrfconnect/chip-module/Kconfig.features +++ b/config/nrfconnect/chip-module/Kconfig.features @@ -21,7 +21,7 @@ if CHIP config CHIP_WIFI bool "Enable nrfconnect Wi-Fi support" - default y if SHIELD_NRF7002_EK || BOARD_NRF7002DK_NRF5340_CPUAPP + default y if SHIELD_NRF7002EK || BOARD_NRF7002DK_NRF5340_CPUAPP select WIFI_NRF700X select WIFI select WPA_SUPP @@ -73,18 +73,77 @@ config SPI_NOR_FLASH_LAYOUT_PAGE_SIZE endif # CHIP_SPI_NOR +config CHIP_NUS + bool "Enable Nordic UART service for Matter purposes" + select BT_NUS + select BT_SMP + select BT_NUS_AUTHEN + help + Enables Nordic UART service (NUS) for Matter samples. + Using NUS service you can control a Matter sample using pre-defined BLE commands + and do defined operations. The CHIP NUS service can be useful to keep communication + with a smart home device when a connection within Matter network is lost. + +if CHIP_NUS + +# Requires providing a PIN for each pair request +config BT_BONDABLE + default n + +config BT_RX_STACK_SIZE + default 1536 + +config SYSTEM_WORKQUEUE_STACK_SIZE + default 2048 + +config BT_DEVICE_APPEARANCE + default 833 + +if !LOG + +config BT_FIXED_PASSKEY + default y + +endif + +config CHIP_NUS_MAX_COMMAND_LEN + int "Maximum length of single command in Bytes" + default 10 + help + Maximum length of single command. This command will be send via Bluetooth LE to + a paired smart home device. + +config CHIP_NUS_FIXED_PASSKEY + int "Define the default passkey for NUS" + depends on BT_FIXED_PASSKEY + default 123456 + help + Define the default password for pairing with the Bluetooth LE device. + +config CHIP_NUS_MAX_COMMANDS + int "Define maximum NUS commands amount" + default 2 + help + Define the maximum number of NUS commands to declare by user. + +endif + + config CHIP_DFU_OVER_BT_SMP bool "Enable DFU over Bluetooth LE SMP feature set" imply CHIP_QSPI_NOR if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 imply CHIP_SPI_NOR if BOARD_NRF7002DK_NRF5340_CPUAPP imply BOOTLOADER_MCUBOOT select MCUMGR - select MCUMGR_SMP_BT - select MCUMGR_CMD_IMG_MGMT - select MCUMGR_CMD_OS_MGMT + select MCUMGR_TRANSPORT_BT + select IMG_MANAGER + select STREAM_FLASH + select ZCBOR + select MCUMGR_GRP_IMG + select MCUMGR_GRP_OS # Enable custom SMP request to erase settings partition. - select MCUMGR_GRP_ZEPHYR_BASIC - select MCUMGR_GRP_BASIC_CMD_STORAGE_ERASE + select MCUMGR_GRP_ZBASIC + select MCUMGR_GRP_ZBASIC_STORAGE_ERASE help Enables Device Firmware Upgrade over Bluetooth LE with SMP and configures the set of options related to that feature. @@ -92,10 +151,10 @@ config CHIP_DFU_OVER_BT_SMP if CHIP_DFU_OVER_BT_SMP # MCU Manager and SMP configuration -config MCUMGR_SMP_BT_AUTHEN +config MCUMGR_TRANSPORT_BT_AUTHEN default n -config MCUMGR_BUF_COUNT +config MCUMGR_TRANSPORT_NETBUF_COUNT default 6 config MCUMGR_MGMT_NOTIFICATION_HOOKS @@ -117,8 +176,8 @@ config BT_L2CAP_TX_MTU config BT_BUF_ACL_RX_SIZE default 502 -# Increase MCUMGR_BUF_SIZE, as it must be big enough to fit MAX MTU + overhead and for single-image DFU default is 384 B -config MCUMGR_BUF_SIZE +# Increase MCUMGR_TRANSPORT_NETBUF_SIZE, as it must be big enough to fit MAX MTU + overhead and for single-image DFU default is 384 B +config MCUMGR_TRANSPORT_NETBUF_SIZE default 1024 # Increase system workqueue size, as SMP is processed within it @@ -128,10 +187,10 @@ config SYSTEM_WORKQUEUE_STACK_SIZE if SOC_SERIES_NRF53X # Enable custom SMP request to erase settings partition. -config MCUMGR_GRP_ZEPHYR_BASIC +config MCUMGR_GRP_ZBASIC default y -config MCUMGR_GRP_BASIC_CMD_STORAGE_ERASE +config MCUMGR_GRP_ZBASIC_STORAGE_ERASE default y endif # SOC_SERIES_NRF53X diff --git a/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults b/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults index 9fee38cb5f38fc..eb0b01e2664ce7 100644 --- a/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults +++ b/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults @@ -75,8 +75,5 @@ config EXCEPTION_STACK_TRACE config NRF_802154_SER_RADIO default y -config NRF_RTC_TIMER_USER_CHAN_COUNT - default 2 - config NRF_802154_ENCRYPTION default y diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index f0e8d9eddfcb66..3ea261d2371eca 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -22,7 +22,7 @@ menuconfig CHIP imply REQUIRES_FULL_LIBC imply NEWLIB_LIBC_NANO imply CBPRINTF_LIBC_SUBSTS - imply POSIX_API if !ARCH_POSIX + imply POSIX_API if !ARCH_POSIX && !CHIP_NRF_PLATFORM imply EVENTFD if !ARCH_POSIX imply REBOOT imply ENTROPY_GENERATOR @@ -30,6 +30,7 @@ menuconfig CHIP imply NET_IPV6 imply NET_CONFIG_NEED_IPV6 imply NET_SOCKETS + imply NET_SOCKETS_POSIX_NAMES if !ARCH_POSIX && CHIP_NRF_PLATFORM imply NETWORKING imply HWINFO imply FLASH diff --git a/config/zephyr/chip-module/Kconfig.features b/config/zephyr/chip-module/Kconfig.features index bc800095dc7ce0..1fa6e051a1d2b2 100644 --- a/config/zephyr/chip-module/Kconfig.features +++ b/config/zephyr/chip-module/Kconfig.features @@ -24,23 +24,23 @@ config MCUMGR bool default y -config MCUMGR_CMD_IMG_MGMT +config MCUMGR_GRP_IMG bool default y -config MCUMGR_CMD_OS_MGMT +config MCUMGR_GRP_OS bool default y -config MCUMGR_SMP_BT +config MCUMGR_TRANSPORT_BT bool default y -config MCUMGR_SMP_BT_AUTHEN +config MCUMGR_TRANSPORT_BT_AUTHEN bool default n -config MCUMGR_BUF_COUNT +config MCUMGR_TRANSPORT_NETBUF_COUNT int default 6 @@ -53,8 +53,8 @@ config BT_BUF_ACL_RX_SIZE int default 502 -# Increase MCUMGR_BUF_SIZE, as it must be big enough to fit MAX MTU + overhead and for single-image DFU default is 384 B -config MCUMGR_BUF_SIZE +# Increase MCUMGR_TRANSPORT_NETBUF_SIZE, as it must be big enough to fit MAX MTU + overhead and for single-image DFU default is 384 B +config MCUMGR_TRANSPORT_NETBUF_SIZE int default 1024 diff --git a/docs/examples/index.md b/docs/examples/index.md index 46482fcbe8934e..7757cc78b75e05 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -69,15 +69,6 @@ chip-tool/README darwin-framework-tool/README ``` -## Dynamic bridge example - -```{toctree} -:glob: -:maxdepth: 1 - -dynamic-bridge-app/**/README -``` - ## Java matter controller example ```{toctree} @@ -202,6 +193,15 @@ shell/README* shell/**/README ``` +## Smoke CO Alarm example + +```{toctree} +:glob: +:maxdepth: 1 + +smoke-co-alarm-app/**/README +``` + ## Temperature measurement example ```{toctree} diff --git a/docs/guides/esp32/ota.md b/docs/guides/esp32/ota.md index ab079250250b40..fb243735fc9696 100644 --- a/docs/guides/esp32/ota.md +++ b/docs/guides/esp32/ota.md @@ -67,3 +67,57 @@ chip-tool. On receiving this command OTA requestor will query for OTA image. ``` ./out/debug/chip-tool otasoftwareupdaterequestor announce-ota-provider 0 0 0 0 ``` + +## Encrypted OTA + +ESP32 supports transferring encrypted OTA images. Currently, an application +image can be encrypted/decrypted using an RSA-3072 key pair. + +### Firmware Changes + +- Enable configuration options for OTA requestor and Encrypted OTA: + + ``` + CONFIG_ENABLE_OTA_REQUESTOR=y + CONFIG_ENABLE_ENCRYPTED_OTA=y + ``` + +- Applications need to provide the key pair to the OTA image processor using + the `InitEncryptedOTA()` API to decrypt the received OTA image. + +- For testing purposes, in `examples/lighting-app/esp32`, there is a logic of + embedding the private key in the firmware. To quickly test, please generate + the key pair and rename it as `esp_image_encryption_public_key.pem` and copy + it to directory `examples/lighting-app/esp32`. + +Please follow the steps below to generate an application image for OTA upgrades: + +1. Generate a new RSA-3072 key pair or use an existing one. + + - To generate a key pair, use the following command: + + ``` + openssl genrsa -out esp_image_encryption_key.pem 3072 + ``` + + - Extract the public key from the key pair: + ``` + openssl rsa -in esp_image_encryption_key.pem -pubout -out esp_image_encryption_public_key.pem + ``` + +2. Encrypt the application binary using the + [esp_enc_img_gen.py](https://github.com/espressif/idf-extra-components/blob/master/esp_encrypted_img/tools/esp_enc_img_gen.py) + script. + + - Use the following command to encrypt the OTA image with the public key: + + ``` + python3 esp_enc_img_gen.py encrypt lighting-app.bin esp_image_encryption_public_key.pem lighting-app-encrypted.bin + ``` + + - Append the Matter OTA header: + ``` + src/app/ota_image_tool.py create --vendor-id 0xFFF1 --product-id 0x8000 --version 2 --version-str "v2.0" -da sha256 lighting-app-encrypted.bin lighting-app-encrypted-ota.bin + ``` + +3. Use the `lighting-app-encrypted-ota.bin` file with the OTA Provider app. diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 55172fcfe511c6..dd8e49f387652d 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -2181,10 +2193,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -2196,7 +2204,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only @@ -2296,22 +2304,43 @@ server cluster IcdManagement = 70 { /** Attributes and commands for selecting a mode from a list of supported options. */ server cluster ModeSelect = 80 { + enum ModeTag : ENUM16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + } + + enum StatusCode : ENUM8 { + kSuccess = 0; + kUnsupportedMode = 1; + kGenericFailure = 2; + } + bitmap Feature : BITMAP32 { - kDeponoff = 0x1; + kOnOff = 0x1; + kExtendedStatus = 0x2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; + struct ModeTagStruct { + optional vendor_id mfgCode = 0; enum16 value = 1; + optional char_string<64> tagName = 2; } struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; - SemanticTagStruct semanticTags[] = 2; + ModeTagStruct modeTags[] = 2; } - readonly attribute char_string<32> description = 0; + readonly attribute char_string<64> description = 0; readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; readonly attribute int8u currentMode = 3; @@ -5905,7 +5934,7 @@ endpoint 0 { ram attribute activeModeThreshold default = 300; callback attribute registeredClients; ram attribute ICDCounter default = 0; - ram attribute clientsSupportedPerFabric default = 1; + ram attribute clientsSupportedPerFabric default = 2; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -5957,7 +5986,7 @@ endpoint 1 { ram attribute sceneTableSize; callback attribute remainingCapacity; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; } server cluster OnOff { diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 2f71043449420b..e9d11230130810 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -400,7 +400,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -556,7 +556,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6432,7 +6432,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9386,7 +9386,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9606,7 +9606,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -28290,7 +28290,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -28446,7 +28446,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -31934,5 +31934,6 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp b/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp index 17fa5d007b8493..a806a22c2757e2 100644 --- a/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp @@ -8,31 +8,30 @@ using namespace chip::app::Clusters::ModeSelect; using chip::Protocols::InteractionModel::Status; using ModeOptionStructType = Structs::ModeOptionStruct::Type; -using SemanticTag = Structs::SemanticTagStruct::Type; +using ModeTagType = Structs::ModeTagStruct::Type; template using List = app::DataModel::List; using storage_value_type = const ModeOptionStructType; namespace { -Structs::ModeOptionStruct::Type buildModeOptionStruct(const char * label, uint8_t mode, - const List & semanticTags) +Structs::ModeOptionStruct::Type buildModeOptionStruct(const char * label, uint8_t mode, const List & modeTags) { Structs::ModeOptionStruct::Type option; - option.label = CharSpan::fromCharString(label); - option.mode = mode; - option.semanticTags = semanticTags; + option.label = CharSpan::fromCharString(label); + option.mode = mode; + option.modeTags = modeTags; return option; } } // namespace -constexpr SemanticTag semanticTagsBlack[] = { { .value = 0 } }; -constexpr SemanticTag semanticTagsCappucino[] = { { .value = 0 } }; -constexpr SemanticTag semanticTagsEspresso[] = { { .value = 0 } }; +ModeTagType modeTagsBlack[] = { detail::Structs::ModeTagStruct::Type{ .value = 0 } }; +ModeTagType modeTagsCappucino[] = { detail::Structs::ModeTagStruct::Type{ .value = 0 } }; +ModeTagType modeTagsEspresso[] = { detail::Structs::ModeTagStruct::Type{ .value = 0 } }; // TODO: Configure your options for each endpoint storage_value_type StaticSupportedModesManager::coffeeOptions[] = { - buildModeOptionStruct("Black", 0, List(semanticTagsBlack)), - buildModeOptionStruct("Cappuccino", 4, List(semanticTagsCappucino)), - buildModeOptionStruct("Espresso", 7, List(semanticTagsEspresso)) + buildModeOptionStruct("Black", 0, List(modeTagsBlack)), + buildModeOptionStruct("Cappuccino", 4, List(modeTagsCappucino)), + buildModeOptionStruct("Espresso", 7, List(modeTagsEspresso)) }; const StaticSupportedModesManager::EndpointSpanPair StaticSupportedModesManager::supportedOptionsByEndpoints[EMBER_AF_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT] = { diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index fc50ade57e9c96..6b28a6e1a61c3c 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -67,7 +67,7 @@ chip_configure_data_model(app ZAP_FILE ${ALL_CLUSTERS_COMMON_DIR}/all-clusters-app.zap ) -if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_SMP_BT) +if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/OTAUtil.cpp) endif() diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp index a5fbf9b1e95d09..cb3087217ab11c 100644 --- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp @@ -358,7 +358,7 @@ void AppTask::FunctionHandler(const AppEvent & event) Instance().CancelTimer(); Instance().mFunction = FunctionEvent::NoneSelected; -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT GetDFUOverSMP().StartServer(); #else LOG_INF("Software update is disabled"); diff --git a/examples/all-clusters-app/nrfconnect/main/include/AppTask.h b/examples/all-clusters-app/nrfconnect/main/include/AppTask.h index 4b57d1dc3f249c..4db18dba683c0e 100644 --- a/examples/all-clusters-app/nrfconnect/main/include/AppTask.h +++ b/examples/all-clusters-app/nrfconnect/main/include/AppTask.h @@ -28,7 +28,7 @@ #include #endif -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT #include "DFUOverSMP.h" #endif diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 30de0c72df3251..ac09d5456eb636 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1961,10 +1973,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1976,7 +1984,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only @@ -2029,22 +2037,43 @@ server cluster BooleanState = 69 { /** Attributes and commands for selecting a mode from a list of supported options. */ server cluster ModeSelect = 80 { + enum ModeTag : ENUM16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + } + + enum StatusCode : ENUM8 { + kSuccess = 0; + kUnsupportedMode = 1; + kGenericFailure = 2; + } + bitmap Feature : BITMAP32 { - kDeponoff = 0x1; + kOnOff = 0x1; + kExtendedStatus = 0x2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; + struct ModeTagStruct { + optional vendor_id mfgCode = 0; enum16 value = 1; + optional char_string<64> tagName = 2; } struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; - SemanticTagStruct semanticTags[] = 2; + ModeTagStruct modeTags[] = 2; } - readonly attribute char_string<32> description = 0; + readonly attribute char_string<64> description = 0; readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; readonly attribute int8u currentMode = 3; @@ -4190,7 +4219,7 @@ endpoint 1 { ram attribute sceneTableSize; callback attribute remainingCapacity; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; } server cluster OnOff { diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 531975331ff1bb..2a1eb98e4d3ae1 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -400,7 +400,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -556,7 +556,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8857,7 +8857,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9077,7 +9077,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -21356,7 +21356,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -21512,7 +21512,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt index 6fdc49b494018e..00ecc2ca2fbfc5 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt @@ -65,7 +65,7 @@ chip_configure_data_model(app ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../all-clusters-common/all-clusters-minimal-app.zap ) -if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_SMP_BT) +if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/OTAUtil.cpp) endif() diff --git a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp index 19ce36436419b3..3307789c9e5989 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp @@ -279,7 +279,7 @@ void AppTask::FunctionHandler(const AppEvent & event) { Instance().CancelTimer(); -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT GetDFUOverSMP().StartServer(); #else LOG_INF("Software update is disabled"); diff --git a/examples/all-clusters-minimal-app/nrfconnect/main/include/AppTask.h b/examples/all-clusters-minimal-app/nrfconnect/main/include/AppTask.h index 9921de58383521..0d5a9f1f1dc84f 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/main/include/AppTask.h +++ b/examples/all-clusters-minimal-app/nrfconnect/main/include/AppTask.h @@ -28,7 +28,7 @@ #include #endif -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT #include "DFUOverSMP.h" #endif diff --git a/examples/android/CHIPTool/app/build.gradle b/examples/android/CHIPTool/app/build.gradle index bdbd03ff48d822..9f116f92d04cd4 100644 --- a/examples/android/CHIPTool/app/build.gradle +++ b/examples/android/CHIPTool/app/build.gradle @@ -5,6 +5,8 @@ apply plugin: 'kotlin-parcelize' android { compileSdkVersion 31 + ndkVersion "23.2.8568313" + defaultConfig { applicationId "com.google.chip.chiptool" minSdkVersion 24 diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt index 7797aef19fa233..59c75e2a976a59 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt @@ -28,9 +28,9 @@ import android.widget.Toast import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.Fragment -import chip.setuppayload.SetupPayload -import chip.setuppayload.SetupPayloadParser -import chip.setuppayload.SetupPayloadParser.UnrecognizedQrCodeException +import chip.onboardingpayload.OnboardingPayload +import chip.onboardingpayload.OnboardingPayloadParser +import chip.onboardingpayload.UnrecognizedQrCodeException import com.google.chip.chiptool.provisioning.AddressCommissioningFragment import com.google.chip.chiptool.provisioning.DeviceProvisioningFragment import com.google.chip.chiptool.provisioning.EnterNetworkFragment @@ -151,10 +151,10 @@ class CHIPToolActivity : val uri = records[0].toUri() if (!uri?.scheme.equals("mt", true)) return - lateinit var setupPayload: SetupPayload + lateinit var setupPayload: OnboardingPayload try { setupPayload = - SetupPayloadParser().parseQrCode(uri.toString().toUpperCase()) + OnboardingPayloadParser().parseQrCode(uri.toString().toUpperCase()) } catch (ex: UnrecognizedQrCodeException) { Log.e(TAG, "Unrecognized QR Code", ex) Toast.makeText(this, "Unrecognized QR Code", Toast.LENGTH_SHORT).show() @@ -208,10 +208,10 @@ class CHIPToolActivity : val payload = JSONObject(payloadString) // parse payload from JSON - val setupPayload = SetupPayload() + val setupPayload = OnboardingPayload() // set defaults setupPayload.discoveryCapabilities = setOf() - setupPayload.optionalQRCodeInfo = mapOf() + setupPayload.optionalQRCodeInfo = HashMap() // read from payload setupPayload.version = payload.getInt("version") diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/BarcodeFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/BarcodeFragment.kt index e591fd64ebd948..0e911d3233d278 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/BarcodeFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/BarcodeFragment.kt @@ -36,11 +36,10 @@ import androidx.camera.lifecycle.ProcessCameraProvider import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat.checkSelfPermission import androidx.fragment.app.Fragment -import chip.setuppayload.SetupPayload -import chip.setuppayload.SetupPayloadParser -import chip.setuppayload.SetupPayloadParser.SetupPayloadException -import chip.setuppayload.SetupPayloadParser.InvalidEntryCodeFormatException -import chip.setuppayload.SetupPayloadParser.UnrecognizedQrCodeException +import chip.onboardingpayload.OnboardingPayload +import chip.onboardingpayload.OnboardingPayloadException +import chip.onboardingpayload.OnboardingPayloadParser +import chip.onboardingpayload.UnrecognizedQrCodeException import com.google.chip.chiptool.R import com.google.chip.chiptool.SelectActionFragment import com.google.chip.chiptool.databinding.BarcodeFragmentBinding @@ -182,14 +181,12 @@ class BarcodeFragment : Fragment() { } private fun handleInputQrCode(qrCode: String) { - lateinit var payload: SetupPayload - var isShortDiscriminator = false + lateinit var payload: OnboardingPayload try { - payload = SetupPayloadParser().parseQrCode(qrCode) - } catch (ex: SetupPayloadException) { + payload = OnboardingPayloadParser().parseQrCode(qrCode) + } catch (ex: OnboardingPayloadException) { try { - payload = SetupPayloadParser().parseManualEntryCode(qrCode) - isShortDiscriminator = true + payload = OnboardingPayloadParser().parseManualPairingCode(qrCode) } catch (ex: Exception) { Log.e(TAG, "Unrecognized Manual Pairing Code", ex) Toast.makeText(requireContext(), "Unrecognized Manual Pairing Code", Toast.LENGTH_SHORT).show() @@ -199,14 +196,14 @@ class BarcodeFragment : Fragment() { Toast.makeText(requireContext(), "Unrecognized QR Code", Toast.LENGTH_SHORT).show() } FragmentUtil.getHost(this@BarcodeFragment, Callback::class.java) - ?.onCHIPDeviceInfoReceived(CHIPDeviceInfo.fromSetupPayload(payload, isShortDiscriminator)) + ?.onCHIPDeviceInfoReceived(CHIPDeviceInfo.fromSetupPayload(payload)) } private fun handleScannedQrCode(barcode: Barcode) { Handler(Looper.getMainLooper()).post { - lateinit var payload: SetupPayload + lateinit var payload: OnboardingPayload try { - payload = SetupPayloadParser().parseQrCode(barcode.displayValue) + payload = barcode.displayValue?.let { OnboardingPayloadParser().parseQrCode(it) } ?: return@post } catch (ex: UnrecognizedQrCodeException) { Log.e(TAG, "Unrecognized QR Code", ex) Toast.makeText(requireContext(), "Unrecognized QR Code", Toast.LENGTH_SHORT).show() diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/CHIPDeviceInfo.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/CHIPDeviceInfo.kt index d4a76221365080..fc57a96c222ab5 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/CHIPDeviceInfo.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/CHIPDeviceInfo.kt @@ -19,8 +19,8 @@ package com.google.chip.chiptool.setuppayloadscanner import android.os.Parcelable -import chip.setuppayload.DiscoveryCapability -import chip.setuppayload.SetupPayload +import chip.onboardingpayload.DiscoveryCapability +import chip.onboardingpayload.OnboardingPayload import kotlinx.parcelize.Parcelize /** Class to hold the CHIP device information. */ @@ -36,16 +36,15 @@ data class CHIPDeviceInfo( val discoveryCapabilities: Set = setOf(), val isShortDiscriminator: Boolean = false, val ipAddress: String? = null, - ) : Parcelable { companion object { - fun fromSetupPayload(setupPayload: SetupPayload, isShortDiscriminator: Boolean = false): CHIPDeviceInfo { + fun fromSetupPayload(setupPayload: OnboardingPayload): CHIPDeviceInfo { return CHIPDeviceInfo( setupPayload.version, setupPayload.vendorId, setupPayload.productId, - setupPayload.discriminator, + setupPayload.getLongDiscriminatorValue(), setupPayload.setupPinCode, setupPayload.commissioningFlow, setupPayload.optionalQRCodeInfo.mapValues { (_, info) -> @@ -57,7 +56,7 @@ data class CHIPDeviceInfo( ) }, setupPayload.discoveryCapabilities, - isShortDiscriminator + setupPayload.hasShortDiscriminator ) } } diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/QrCodeInfo.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/QrCodeInfo.kt index 5ad27868b95ea0..c9b2367ee998ba 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/QrCodeInfo.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/QrCodeInfo.kt @@ -1,13 +1,13 @@ package com.google.chip.chiptool.setuppayloadscanner import android.os.Parcelable -import chip.setuppayload.OptionalQRCodeInfo.OptionalQRCodeInfoType +import chip.onboardingpayload.OptionalQRCodeInfo.OptionalQRCodeInfoType import kotlinx.parcelize.Parcelize @Parcelize data class QrCodeInfo( val tag: Int, val type: OptionalQRCodeInfoType, - val data: String, + val data: String?, val intDataValue: Int ) : Parcelable diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index fbc51ea9d37fc8..6531edb1e75503 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1563,10 +1575,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1578,7 +1586,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index ffde35c20b4075..ab047dcf8cd7a8 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -6062,7 +6062,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6218,7 +6218,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/chef.py b/examples/chef/chef.py index b663a49f495676..7e8de18787458e 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -75,6 +75,8 @@ def load_config() -> None: "for the vendor's SDK") configStream = open(configFile, 'w') config["nrfconnect"]["ZEPHYR_BASE"] = os.environ.get('ZEPHYR_BASE') + config["nrfconnect"]["ZEPHYR_SDK_INSTALL_DIR"] = os.environ.get( + 'ZEPHYR_SDK_INSTALL_DIR') config["nrfconnect"]["TTY"] = None config["esp32"]["IDF_PATH"] = os.environ.get('IDF_PATH') config["esp32"]["TTY"] = None @@ -374,9 +376,6 @@ def main() -> int: flush_print( f"{device_name} in CICD config but not {_DEVICE_FOLDER}!") exit(1) - if options.build_target == "nrfconnect": - shell.run_cmd( - "export GNUARMEMB_TOOLCHAIN_PATH=\"$PW_ARM_CIPD_INSTALL_DIR\"") shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") command = f"./chef.py -cbr -d {device_name} -t {options.build_target}" flush_print(f"Building {command}", with_border=True) @@ -412,8 +411,6 @@ def main() -> int: command += " ".join(args) flush_print(f"Building {command}", with_border=True) shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") - shell.run_cmd( - "export GNUARMEMB_TOOLCHAIN_PATH=\"$PW_ARM_CIPD_INSTALL_DIR\"") try: shell.run_cmd(command) except RuntimeError as build_fail_error: @@ -469,11 +466,29 @@ def main() -> int: elif options.build_target == "nrfconnect": if config['nrfconnect']['ZEPHYR_BASE'] is None: flush_print( - 'Path for nrfconnect SDK was not found. Make sure nrfconnect.ZEPHYR_BASE is set on your config.yaml file') + 'The path for nrfconnect SDK was not found. Make sure nrfconnect.ZEPHYR_BASE is set on your config.yaml file. This is typically /ncs/vX.X.X/zephyr') exit(1) - shell.run_cmd( - f'source {config["nrfconnect"]["ZEPHYR_BASE"]}/zephyr-env.sh') - shell.run_cmd("export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb") + if config['nrfconnect']['ZEPHYR_SDK_INSTALL_DIR'] is None: + flush_print( + 'The path for nrfconnect toolchain was not found. Make sure nrfconnect.ZEPHYR_SDK_INSTALL_DIR is set on your config.yaml file. This is typically /ncs/toolchains/vX.X.X/opt/zephyr-sdk') + exit(1) + zephyr_sdk_dir = config['nrfconnect']['ZEPHYR_SDK_INSTALL_DIR'] + shell.run_cmd("export ZEPHYR_TOOLCHAIN_VARIANT=zephyr") + shell.run_cmd(f"export ZEPHYR_SDK_INSTALL_DIR={zephyr_sdk_dir}") + shell.run_cmd(f"export ZEPHYR_BASE={config['nrfconnect']['ZEPHYR_BASE']}") + shell.run_cmd(f'source {config["nrfconnect"]["ZEPHYR_BASE"]}/zephyr-env.sh') + # QUIRK: + # When the Zephyr SDK is installed as a part of the NCS toolchain, the build system will use + # build tools from the NCS toolchain, but it will not update the PATH and LD_LIBRARY_PATH + # and hence the build will fail. This ideally, should be handled automatically by the NCS + # build system but until it is fixed, set the variables manually. + ncs_toolchain_dir = os.path.abspath(f"{zephyr_sdk_dir}/../..") + if os.path.exists(os.path.join(ncs_toolchain_dir, 'manifest.json')): + shell.run_cmd(f"export PATH=$PATH:{ncs_toolchain_dir}/usr/bin") + shell.run_cmd(f"export PATH=$PATH:{ncs_toolchain_dir}/usr/local/bin") + shell.run_cmd(f"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{ncs_toolchain_dir}/usr/lib") + shell.run_cmd( + f"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{ncs_toolchain_dir}/usr/local/lib") elif options.build_target == "linux": pass elif options.build_target == "silabs-thread": diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 641130d29f6ded..a458da9d021e37 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1448,10 +1460,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1463,7 +1471,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 45304d8862e103..ebc9e4e5486f58 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1208,10 +1220,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1223,7 +1231,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** Attributes and commands for controlling the color properties of a color-capable light. */ diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 779ca4ce8ea28c..72da64cff277aa 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1163,10 +1175,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1178,7 +1186,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 0ff63d13f8ad4e..c8bbadd07fab6d 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1312,10 +1324,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1327,7 +1335,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 185d5ca07a0946..7280968fb259fc 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1163,10 +1175,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1178,7 +1186,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index f6e85f01d4b968..a7d53aaeecd93c 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1312,10 +1324,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1327,7 +1335,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 09d3036c8a9612..0ad9c02d5cc4c2 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1150,10 +1162,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1165,7 +1173,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 853fadc71c258f..3aab05c6ace501 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1238,10 +1250,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1253,7 +1261,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 5ef010f0bad447..0c50e8602406b8 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1306,10 +1318,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1321,7 +1329,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 9f8dce25cf5085..dbf22aa9b13b97 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1238,10 +1250,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1253,7 +1261,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 95af96b236b77f..8f11a43bf3ac8e 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1238,10 +1250,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1253,7 +1261,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 6edb08405d948f..174d400db5ea1c 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1238,10 +1250,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1253,7 +1261,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index bceaeaea4b6677..7bb540870bd8b6 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1312,10 +1324,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1327,7 +1335,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 7e5687d169cc1d..caffea35361731 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1275,10 +1287,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1290,7 +1298,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 56e270ab96126a..1502efbb5aac49 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1211,10 +1223,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1226,7 +1234,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index d416c526db7b8f..9deb03484943b1 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1238,10 +1250,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1253,7 +1261,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 10e00262daafbb..391a6975cd2737 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -861,10 +873,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -876,7 +884,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface for configuring and controlling pumps. */ diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 53aa0b934f2666..17f82500378cd3 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1306,10 +1318,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1321,7 +1329,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 3ad8ef98491391..e04574d866f334 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1238,10 +1250,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1253,7 +1261,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 49389f4537b4c4..b0462727f5b4fc 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1163,10 +1175,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1178,7 +1186,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 02a2ea6a49c10b..e4a671aad8c9ad 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1163,10 +1175,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1178,7 +1186,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index 4249001f35a0ec..c813a314a74264 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -32,7 +32,6 @@ set(CHIP_CFLAGS "${CHIP_CFLAGS} -DCHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID=${CONFIG_ if(NOT ${CONFIG_DEVICE_PRODUCT_NAME} STREQUAL "") set(CHIP_CFLAGS "${CHIP_CFLAGS} -DCHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME=\"${CONFIG_DEVICE_PRODUCT_NAME}\"") endif() -set(CHIP_CFLAGS "${CHIP_CFLAGS} -DCHIP_PLATFORM_NRFCONNECT=1") if(NOT ${CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING} STREQUAL "") set(CHIP_CFLAGS "${CHIP_CFLAGS} -DCHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING=\"${CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING}\"") endif() @@ -76,7 +75,7 @@ target_include_directories(app PRIVATE ${NRFCONNECT_COMMON}/app/include ) -if (CONFIG_ENABLE_CHIP_SHELL) +if (CONFIG_CHIP_LIB_SHELL) target_sources(app PRIVATE ${CHEF}/shell_common/globals.cpp ${CHEF}/shell_common/cmd_misc.cpp @@ -86,7 +85,7 @@ if (CONFIG_ENABLE_CHIP_SHELL) target_include_directories(app PRIVATE ${CHEF}/shell_common/include ) -endif (CONFIG_ENABLE_CHIP_SHELL) +endif() target_sources(app PRIVATE ${CHEF}/nrfconnect/main.cpp diff --git a/examples/chef/nrfconnect/main.cpp b/examples/chef/nrfconnect/main.cpp index 17e207ead026cc..c4157798567e5b 100644 --- a/examples/chef/nrfconnect/main.cpp +++ b/examples/chef/nrfconnect/main.cpp @@ -138,7 +138,7 @@ int main() ChipLogError(AppServer, "OpenBasicCommissioningWindow() failed"); } -#if CONFIG_ENABLE_CHIP_SHELL || CONFIG_CHIP_LIB_SHELL +#if CONFIG_CHIP_LIB_SHELL int rc = Engine::Root().Init(); if (rc != 0) { @@ -154,7 +154,7 @@ int main() cmd_app_server_init(); #endif -#if CONFIG_ENABLE_CHIP_SHELL || CONFIG_CHIP_LIB_SHELL +#if CONFIG_CHIP_LIB_SHELL Engine::Root().RunMainLoop(); #endif diff --git a/examples/chef/sample_app_util/test_files/sample_zap_file.zap b/examples/chef/sample_app_util/test_files/sample_zap_file.zap index c9e1e58c89a113..c954ce70224b27 100644 --- a/examples/chef/sample_app_util/test_files/sample_zap_file.zap +++ b/examples/chef/sample_app_util/test_files/sample_zap_file.zap @@ -360,7 +360,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -516,7 +516,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5734,7 +5734,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5890,7 +5890,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp b/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp index 45cd4461dae7ab..057d1f2059e05f 100644 --- a/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp +++ b/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp @@ -21,6 +21,7 @@ #include #include +constexpr const char * kDataVersionKey = "dataVersion"; constexpr const char * kClusterIdKey = "clusterId"; constexpr const char * kEndpointIdKey = "endpointId"; constexpr const char * kAttributeIdKey = "attributeId"; @@ -69,6 +70,10 @@ CHIP_ERROR LogAttributeAsJSON(const chip::app::ConcreteDataAttributePath & path, value[kClusterIdKey] = path.mClusterId; value[kEndpointIdKey] = path.mEndpointId; value[kAttributeIdKey] = path.mAttributeId; + if (path.mDataVersion.HasValue()) + { + value[kDataVersionKey] = path.mDataVersion.Value(); + } chip::TLV::TLVReader reader; reader.Init(*data); diff --git a/examples/chip-tool/commands/interactive/InteractiveCommands.cpp b/examples/chip-tool/commands/interactive/InteractiveCommands.cpp index 84e543afada9ba..41fcf731ebc7a3 100644 --- a/examples/chip-tool/commands/interactive/InteractiveCommands.cpp +++ b/examples/chip-tool/commands/interactive/InteractiveCommands.cpp @@ -153,50 +153,56 @@ struct InteractiveServerResult { auto lock = ScopedLock(mMutex); - std::string resultsStr; + std::stringstream content; + content << "{"; + + content << " \"results\": ["; if (mResults.size()) { for (const auto & result : mResults) { - resultsStr = resultsStr + result + ","; + content << result << ","; } // Remove last comma. - resultsStr.pop_back(); + content.seekp(-1, std::ios_base::end); } if (mStatus != EXIT_SUCCESS) { - if (resultsStr.size()) + if (mResults.size()) { - resultsStr = resultsStr + ","; + content << ","; } - resultsStr = resultsStr + "{ \"error\": \"FAILURE\" }"; + content << "{ \"error\": \"FAILURE\" }"; } + content << "],"; - std::string logsStr; + content << "\"logs\": ["; if (mLogs.size()) { for (const auto & log : mLogs) { - logsStr = logsStr + "{"; - logsStr = logsStr + " \"module\": \"" + log.module + "\","; - logsStr = logsStr + " \"category\": \"" + log.messageType + "\","; - logsStr = logsStr + " \"message\": \"" + log.message + "\""; - logsStr = logsStr + "},"; + content << "{" + " \"module\": \"" + + log.module + + "\"," + " \"category\": \"" + + log.messageType + + "\"," + " \"message\": \"" + + log.message + + "\"" + "},"; } // Remove last comma. - logsStr.pop_back(); + content.seekp(-1, std::ios_base::end); } + content << "]"; - std::string jsonLog; - jsonLog = jsonLog + "{"; - jsonLog = jsonLog + " \"results\": [" + resultsStr + "],"; - jsonLog = jsonLog + " \"logs\": [" + logsStr + "]"; - jsonLog = jsonLog + "}"; - - return jsonLog; + content << "}"; + return content.str(); } }; diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py index df906ec318b83e..15522f8dcb3144 100644 --- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py +++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py @@ -34,6 +34,7 @@ _ERROR = 'error' _CLUSTER_ERROR = 'clusterError' _VALUE = 'value' +_DATA_VERSION = 'dataVersion' # FabricIndex is a special case where the field is added as a struct field by the SDK # if needed but is not part of the XML definition of the struct. @@ -88,17 +89,20 @@ def __translate_names(self, payloads): elif key == _EVENT_ID: key = _EVENT value = specs.get_event_name(payload[_CLUSTER_ID], value) - elif key == _VALUE or key == _ERROR or key == _CLUSTER_ERROR: + elif key == _VALUE or key == _ERROR or key == _CLUSTER_ERROR or key == _DATA_VERSION: pass else: # Raise an error since the other fields probably needs to be translated too. raise KeyError(f'Error: field "{key}" not supported') - if value is None and (key == _CLUSTER or key == _RESPONSE or key == _ATTRIBUTE or key == _EVENT): + if value is None and (key == _CLUSTER or key == _RESPONSE or key == _ATTRIBUTE or key == _EVENT) and _ERROR not in payload: # If the definition for this cluster/command/attribute/event is missing, there is not # much we can do to convert the response to the proper format. It usually indicates that # the cluster definition is missing something. So we just raise an exception to tell the # user something is wrong and the cluster definition needs to be updated. + # The only exception being when the definition can not be found but the returned payload + # contains an error. It could be because the payload is for an unknown cluster/command/attribute/event + # in which case we obviously don't have a definition for it. cluster_code = hex(payload[_CLUSTER_ID]) if key == _CLUSTER: raise KeyError( diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py index 0dbca4a359a2e9..f060a50c7604a4 100644 --- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py +++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py @@ -16,7 +16,88 @@ import json import re +_ANY_COMMANDS_LIST = [ + 'ReadById', + 'WriteById', + 'SubscribeById', + 'ReadEventById', + 'SubscribeEventById', + 'ReadAll', + 'SubscribeAll', +] + +_ANY_COMMANDS_LIST_ARGUMENTS_WITH_WILDCARDS = [ + 'ClusterId', + 'AttributeId', + 'EventId', +] + + _ALIASES = { + 'AnyCommands': { + 'alias': 'any', + 'commands': { + 'CommandById': { + 'alias': 'command-by-id', + 'arguments': { + 'ClusterId': 'cluster-id', + 'CommandId': 'command-id', + }, + }, + 'ReadById': { + 'alias': 'read-by-id', + 'arguments': { + 'ClusterId': 'cluster-ids', + 'AttributeId': 'attribute-ids', + }, + }, + 'WriteById': { + 'alias': 'write-by-id', + 'arguments': { + 'ClusterId': 'cluster-ids', + 'AttributeId': 'attribute-ids', + 'Value': 'attribute-values' + }, + }, + 'SubscribeById': { + 'alias': 'subscribe-by-id', + 'arguments': { + 'ClusterId': 'cluster-ids', + 'AttributeId': 'attribute-ids', + }, + }, + 'ReadEventById': { + 'alias': 'read-event-by-id', + 'arguments': { + 'ClusterId': 'cluster-id', + 'EventId': 'event-id', + }, + }, + 'SubscribeEventById': { + 'alias': 'subscribe-event-by-id', + 'arguments': { + 'ClusterId': 'cluster-id', + 'EventId': 'event-id', + }, + }, + 'ReadAll': { + 'alias': 'read-all', + 'arguments': { + 'ClusterId': 'cluster-ids', + 'AttributeId': 'attribute-ids', + 'EventId': 'event-ids', + }, + }, + 'SubscribeAll': { + 'alias': 'subscribe-all', + 'arguments': { + 'ClusterId': 'cluster-ids', + 'AttributeId': 'attribute-ids', + 'EventId': 'event-ids', + }, + }, + } + }, 'CommissionerCommands': { 'alias': 'pairing', 'commands': { @@ -199,7 +280,7 @@ def __maybe_add_endpoint(self, rv, request): endpoint_argument_name = 'endpoint-id-ignored-for-group-commands' endpoint_argument_value = request.endpoint - if (request.is_attribute and not request.command == "writeAttribute") or request.is_event: + if (request.is_attribute and not request.command == "writeAttribute") or request.is_event or (request.command in _ANY_COMMANDS_LIST and not request.command == "WriteById"): endpoint_argument_name = 'endpoint-ids' if rv: @@ -213,7 +294,8 @@ def __maybe_add_command_arguments(self, rv, request): for entry in request.arguments['values']: name = self.__get_argument_name(request, entry) - value = self.__encode_value(entry['value']) + value = self.__encode_value( + request.command, entry.get('name'), entry['value']) if rv: rv += ', ' rv += f'"{name}":{value}' @@ -242,11 +324,24 @@ def __maybe_add(self, rv, value, name): rv += f'"{name}":"{value}"' return rv - def __encode_value(self, value): + def __encode_value(self, command_name, argument_name, value): + value = self.__encode_wildcards(command_name, argument_name, value) value = self.__encode_octet_strings(value) value = self.__lower_camel_case_member_fields(value) return self.__convert_to_json_string(value) + def __encode_wildcards(self, command_name, argument_name, value): + if value != '*': + return value + + # maybe a wildcard + if command_name in _ANY_COMMANDS_LIST and argument_name in _ANY_COMMANDS_LIST_ARGUMENTS_WITH_WILDCARDS: + # translate * to wildcard constant + return 0xFFFFFFFF + + # return actual '*' as value ... not a wildcard-compatible argument + return value + def __encode_octet_strings(self, value): if isinstance(value, list): value = [self.__encode_octet_strings(entry) for entry in value] diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 21f44eb0aa564e..18cdf112410294 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1374,10 +1386,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1389,7 +1397,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index b60d198e115e64..d1d9cf4abe5e7d 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -360,7 +360,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -516,7 +516,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5904,7 +5904,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6060,7 +6060,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index d96481371393f7..109ffe2c10e07c 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -1,7 +1,7 @@ { "include": "../../../../src/app/tests/suites/ciTests.json", "disable": [ - "TestClientMonitoringCluster", + "TestIcdManagementCluster", "Test_TC_SC_4_2", "Test_TC_SC_5_2", "TestClusterComplexTypes", diff --git a/examples/dynamic-bridge-app/bridge-common/BUILD.gn b/examples/dynamic-bridge-app/bridge-common/BUILD.gn deleted file mode 100644 index 584e172b654b7c..00000000000000 --- a/examples/dynamic-bridge-app/bridge-common/BUILD.gn +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/chip.gni") - -import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") -import("${chip_root}/src/app/chip_data_model.gni") - -chip_data_model("dynamic-bridge-common") { - zap_file = "bridge-app.zap" - - zap_pregenerated_dir = - "${chip_root}/zzz_generated/dynamic-bridge-app/zap-generated" - - is_server = true - - # TODO: the definition of DYNAMIC_ENDPOINT_COUNT needs find a common home! - cflags = [ "-DDYNAMIC_ENDPOINT_COUNT=16" ] -} - -if (chip_enable_pw_rpc) { - import("//build_overrides/pigweed.gni") - IMPORT("$dir_pw_protobuf_compiler/proto.gni") - - pw_proto_library("bridge_service") { - sources = [ "protos/bridge_service.proto" ] - inputs = [ "protos/bridge_service.options" ] - strip_prefix = "protos" - prefix = "bridge_service" - } -} diff --git a/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.options b/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.options deleted file mode 100644 index 11b8dfc097fba5..00000000000000 --- a/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.options +++ /dev/null @@ -1,2 +0,0 @@ -chip.rpc.bridge.AddDevice.device_types max_count:32 -chip.rpc.bridge.AddDevice.clusters max_count:64 diff --git a/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.proto b/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.proto deleted file mode 100644 index 1917ba1f0c4c00..00000000000000 --- a/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package chip.rpc.bridge; - -message Empty {} - -message RemoveDevice { - uint32 id = 1; -} - -message Cluster { - uint32 cluster_id = 1; -} - -message DeviceType { - uint32 id = 1; - uint32 version = 2; -} - -message AddDevice { - repeated Cluster clusters = 1; - repeated DeviceType device_types = 2; - uint32 parent_endpoint = 3; -} - -message AddDeviceResponse { - uint32 id = 1; -} - -service Bridge { - rpc Add(AddDevice) returns (AddDeviceResponse){}; - rpc Remove(RemoveDevice) returns (Empty){}; -} diff --git a/examples/dynamic-bridge-app/linux/BUILD.gn b/examples/dynamic-bridge-app/linux/BUILD.gn deleted file mode 100644 index 08c718915eb7e3..00000000000000 --- a/examples/dynamic-bridge-app/linux/BUILD.gn +++ /dev/null @@ -1,128 +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. - -import("//build_overrides/build.gni") -import("//build_overrides/chip.gni") - -import("${chip_root}/build/chip/chip_codegen.gni") -import("${chip_root}/build/chip/tools.gni") -import("${chip_root}/src/app/common_flags.gni") - -import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") - -if (chip_enable_pw_rpc) { - import("//build_overrides/pigweed.gni") - import("$dir_pw_build/target_types.gni") -} - -assert(chip_build_tools) - -chip_codegen("chip-bridge-codegen") { - input = - "${chip_root}/examples/dynamic-bridge-app/bridge-common/bridge-app.matter" - generator = "bridge" - - outputs = [ - "bridge/OnOff.h", - "bridge/LevelControl.h", - "bridge/Descriptor.h", - "bridge/Switch.h", - "bridge/TemperatureMeasurement.h", - "bridge/BridgeClustersImpl.h", - ] -} - -executable("dynamic-chip-bridge-app") { - sources = [ - "Backend.cpp", - "Clusters.cpp", - "Device.cpp", - "DynamicDevice.cpp", - "UserInputBackend.cpp", - "bridged-actions-stub.cpp", - "main.cpp", - ] - - deps = [ - ":chip-bridge-codegen", - "${chip_root}/examples/dynamic-bridge-app/bridge-common:dynamic-bridge-common", - "${chip_root}/examples/platform/linux:app-main", - "${chip_root}/src/app/tests/suites/credentials:dac_provider", - "${chip_root}/src/lib", - "${chip_root}/src/lib/assign", - ] - - include_dirs = [ - "include", - target_gen_dir, - ] - - if (chip_enable_pw_rpc) { - defines = [ - "PW_RPC_ENABLED", - "PW_RPC_ATTRIBUTE_SERVICE=1", - "PW_RPC_DESCRIPTOR_SERVICE=1", - "PW_RPC_DEVICE_SERVICE=1", - "PW_RPC_TRACING_SERVICE=1", - ] - - sources += [ - "${chip_root}/examples/platform/linux/Rpc.cpp", - "${chip_root}/examples/platform/linux/system_rpc_server.cc", - "bridge_service.cpp", - ] - - deps += [ - "$dir_pw_hdlc:pw_rpc", - "$dir_pw_hdlc:rpc_channel_output", - "$dir_pw_log", - "$dir_pw_rpc:server", - "$dir_pw_rpc/system_server:facade", - "$dir_pw_stream:socket_stream", - "$dir_pw_stream:sys_io_stream", - "$dir_pw_sync:mutex", - "$dir_pw_trace", - "$dir_pw_trace_tokenized", - "$dir_pw_trace_tokenized:trace_rpc_service", - "${chip_root}/config/linux/lib/pw_rpc:pw_rpc", - "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:rpc_services", - "${chip_root}/examples/dynamic-bridge-app/bridge-common:bridge_service.nanopb_rpc", - ] - - deps += pw_build_LINK_DEPS - - include_dirs += [ "${chip_root}/examples/common" ] - } else { - # The system_rpc_server.cc file is in pigweed and doesn't compile with - # -Wconversion, remove check for RPC build only. - cflags = [ "-Wconversion" ] - } - - output_dir = root_out_dir - - configs += [ "${chip_root}/src:includes" ] -} - -group("linux") { - deps = [ ":dynamic-chip-bridge-app" ] -} - -group("default") { - deps = [ ":linux" ] -} diff --git a/examples/dynamic-bridge-app/linux/Backend.cpp b/examples/dynamic-bridge-app/linux/Backend.cpp deleted file mode 100644 index 6b7c0628e709c2..00000000000000 --- a/examples/dynamic-bridge-app/linux/Backend.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * Copyright (c) 2022 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 "Backend.h" - -#include "main.h" - -std::vector> g_devices; -std::vector> g_device_impls; - -bool RemoveDeviceAt(uint32_t index) -{ - if (index >= g_devices.size() || !g_devices[index]) - { - return false; - } - - RemoveDeviceEndpoint(g_devices[index].get()); - - for (auto & room : gRooms) - room.RemoveEndpoint(g_devices[index]->GetEndpointId()); - - g_devices[index] = nullptr; - g_device_impls[index] = nullptr; - - return true; -} - -int AddDevice(std::unique_ptr device) -{ - auto dev = std::make_unique(device->CreateDevice()); - int ep = AddDeviceEndpoint(dev.get()); - if (ep < 0) - { - return -1; - } - - size_t index = (size_t) ep; - if (g_devices.size() <= index) - { - g_devices.resize(index + 1); - g_device_impls.resize(index + 1); - } - g_devices[index] = std::move(dev); - g_device_impls[index] = std::move(device); - return ep; -} diff --git a/examples/dynamic-bridge-app/linux/Clusters.cpp b/examples/dynamic-bridge-app/linux/Clusters.cpp deleted file mode 100644 index 016526c3dfb7ef..00000000000000 --- a/examples/dynamic-bridge-app/linux/Clusters.cpp +++ /dev/null @@ -1,86 +0,0 @@ -#include "GeneratedClusters.h" - -#include "Device.h" - -CommonCluster::CommonCluster(std::unique_ptr cluster) : - mAttributes(cluster->GetAttributes()), mStorage(std::move(cluster)) -{} -CommonCluster::~CommonCluster() = default; - -chip::ClusterId CommonCluster::GetClusterId() -{ - return mStorage->GetClusterId(); -} - -void CommonCluster::SetEndpointId(chip::EndpointId id) -{ - mEndpoint = id; -} - -chip::EndpointId CommonCluster::GetEndpointId() const -{ - return mEndpoint; -} - -void CommonCluster::SetCallback(PropagateWriteCB * cb) -{ - mCallback = cb; -} - -bool CommonCluster::active() const -{ - return mEndpoint < 0xFFFF; -} - -CHIP_ERROR CommonCluster::ForwardWriteToBridge(const chip::app::ConcreteDataAttributePath & aPath, - chip::app::AttributeValueDecoder & aDecoder) -{ - if (mCallback) - return (*mCallback)(this, aPath, aDecoder); - return WriteFromBridge(aPath, aDecoder); -} - -CHIP_ERROR CommonCluster::WriteFromBridge(const chip::app::ConcreteDataAttributePath & aPath, - chip::app::AttributeValueDecoder & aDecoder) -{ - AttributeInterface * a = FindAttribute(aPath.mAttributeId); - if (!a) - return CHIP_ERROR_NOT_IMPLEMENTED; - return a->Write(aPath, aDecoder); -} - -chip::Span CommonCluster::GetAllAttributes() -{ - return chip::Span(mAttributes.data(), mAttributes.size()); -} - -AttributeInterface * CommonCluster::FindAttribute(chip::AttributeId id) -{ - for (auto * attr : mAttributes) - if (attr->GetId() == id) - return attr; - return nullptr; -} - -AttributeInterface * CommonCluster::FindAttributeByName(chip::CharSpan name) -{ - for (auto * attr : mAttributes) - if (name.data_equal(attr->GetName())) - return attr; - return nullptr; -} - -void CommonCluster::OnUpdated(chip::AttributeId attr) -{ - if (active()) - MatterReportingAttributeChangeCallback(GetEndpointId(), GetClusterId(), attr); -} - -bool CommonCluster::Write(chip::AttributeId attr, chip::TLV::TLVReader & reader) -{ - chip::app::AttributeValueDecoder decoder(reader, chip::Access::SubjectDescriptor()); - if (WriteFromBridge(chip::app::ConcreteDataAttributePath(GetEndpointId(), GetClusterId(), attr), decoder) != CHIP_NO_ERROR) - return false; - OnUpdated(attr); - return true; -} diff --git a/examples/dynamic-bridge-app/linux/Device.cpp b/examples/dynamic-bridge-app/linux/Device.cpp deleted file mode 100644 index c749f9bb5babd4..00000000000000 --- a/examples/dynamic-bridge-app/linux/Device.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "Device.h" - -#include -#include - -Device::Device(chip::Span dataVersions, chip::Span clusters, - chip::Span clusterImpl, const chip::Span & deviceTypeList, - chip::EndpointId parentId) : - mParentEndpointId(parentId), - mDataVersions(dataVersions), mClusters(clusters), mClusterImpl(clusterImpl), mDeviceTypeList(deviceTypeList) -{ - mEndpointType.cluster = clusters.data(); - mEndpointType.clusterCount = (uint8_t) clusters.size(); - mEndpointType.endpointSize = 0; -} - -void Device::SetEndpointId(chip::EndpointId id) -{ - mEndpointId = id; - for (auto * c : mClusterImpl) - c->SetEndpointId(id); -} - -const char * Device::GetName() -{ - return mDeviceName.c_str(); -} - -void Device::SetName(const char * name) -{ - mDeviceName = name; -} diff --git a/examples/dynamic-bridge-app/linux/Dockerfile b/examples/dynamic-bridge-app/linux/Dockerfile deleted file mode 100644 index 8578398312602b..00000000000000 --- a/examples/dynamic-bridge-app/linux/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright (c) 2020-2021 Project CHIP Authors -# All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -FROM connectedhomeip/chip-cirque-device-base:latest - -COPY out/debug/dynamic-chip-bridge-app /usr/bin/ -COPY entrypoint.sh / - -ENTRYPOINT ["/entrypoint.sh", "server"] diff --git a/examples/dynamic-bridge-app/linux/DynamicDevice.cpp b/examples/dynamic-bridge-app/linux/DynamicDevice.cpp deleted file mode 100644 index 9842715547b19d..00000000000000 --- a/examples/dynamic-bridge-app/linux/DynamicDevice.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include - -#include "DynamicDevice.h" - -#define DEVICE_TYPE_BRIDGED_NODE 0x0013 -// Device Version for dynamic endpoints: -#define DEVICE_VERSION_DEFAULT 1 - -namespace { -static const int kDescriptorAttributeArraySize = 254; - -DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(descriptorAttrs) -DECLARE_DYNAMIC_ATTRIBUTE(chip::app::Clusters::Descriptor::Attributes::DeviceTypeList::Id, ARRAY, kDescriptorAttributeArraySize, - 0), /* device list */ - DECLARE_DYNAMIC_ATTRIBUTE(chip::app::Clusters::Descriptor::Attributes::ServerList::Id, ARRAY, kDescriptorAttributeArraySize, - 0), /* server list */ - DECLARE_DYNAMIC_ATTRIBUTE(chip::app::Clusters::Descriptor::Attributes::ClientList::Id, ARRAY, kDescriptorAttributeArraySize, - 0), /* client list */ - DECLARE_DYNAMIC_ATTRIBUTE(chip::app::Clusters::Descriptor::Attributes::PartsList::Id, ARRAY, kDescriptorAttributeArraySize, - 0), /* parts list */ - DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); -} // namespace - -DynamicDevice::DynamicDevice() {} - -void DynamicDevice::AddDeviceType(EmberAfDeviceType type) -{ - mDeviceTypes.push_back(type); -} - -Device DynamicDevice::CreateDevice() -{ - // All nodes are bridged devices. - mDeviceTypes.push_back(EmberAfDeviceType{ DEVICE_TYPE_BRIDGED_NODE, DEVICE_VERSION_DEFAULT }); - mVersions.resize(mClusterRawPtrs.size() + 1); // +1 for the descriptor cluster - for (auto * c : mClusterRawPtrs) - mClusterBaseRawPtrs.push_back(c); - - // Force a default descriptor cluster to be present. - mClusterDecls.emplace_back( - EmberAfCluster DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::Descriptor::Id, descriptorAttrs, nullptr, nullptr)); - - return Device(chip::Span(mVersions.data(), mVersions.size()), - chip::Span(mClusterDecls.data(), mClusterDecls.size()), - chip::Span(mClusterBaseRawPtrs.data(), mClusterBaseRawPtrs.size()), - chip::Span(mDeviceTypes.data(), mDeviceTypes.size()), mParentEndpointId); -} - -DynamicDevice & DynamicDevice::AddCluster(std::unique_ptr cluster, - const chip::Span & attribs, - const chip::CommandId * incomingCommands, const chip::CommandId * outgoingCommands) -{ - AddCluster(cluster.get(), attribs, incomingCommands, outgoingCommands); - mClusters.emplace_back(std::move(cluster)); - return *this; -} - -DynamicDevice & DynamicDevice::AddCluster(CommonCluster * cluster, const chip::Span & attribs, - const chip::CommandId * incomingCommands, const chip::CommandId * outgoingCommands) -{ - // Do what DECLARE_DYNAMIC_CLUSTER does. - mClusterDecls.emplace_back(EmberAfCluster{ cluster->GetClusterId(), attribs.data(), (uint16_t) attribs.size(), 0, - ZAP_CLUSTER_MASK(SERVER), nullptr, incomingCommands, outgoingCommands }); - mClusterRawPtrs.emplace_back(cluster); - return *this; -} - -DynamicDevice & DynamicDevice::AddCluster(std::unique_ptr cluster) -{ - auto ptr = cluster.get(); - return AddCluster(std::move(cluster), - chip::Span(ptr->mAttributeDecls.data(), ptr->mAttributeDecls.size()), - ptr->mIncomingCommands, ptr->mOutgoingCommands); -} diff --git a/examples/dynamic-bridge-app/linux/README.md b/examples/dynamic-bridge-app/linux/README.md deleted file mode 100644 index cefae9a466f5c7..00000000000000 --- a/examples/dynamic-bridge-app/linux/README.md +++ /dev/null @@ -1,179 +0,0 @@ -# Matter Linux Dynamic Endpoints Bridge Example - -An example demonstrating a simple lighting bridge and the use of dynamic -endpoints. The document will describe the theory of operation and how to build -and run Matter Linux Bridge Example on Raspberry Pi. This doc is tested on -**Ubuntu for Raspberry Pi Server 20.04 LTS (aarch64)** and **Ubuntu for -Raspberry Pi Desktop 20.10 (aarch64)** - -
- -- [Matter Linux Dynamic Endpoints Bridge Example](#matter-linux-dynamic-endpoints-bridge-example) - - [Theory of Operation](#theory-of-operation) - - [Building](#building) - - [Running the Complete Example on Raspberry Pi 4](#running-the-complete-example-on-raspberry-pi-4) - -
- -## Theory of Operation - -### Dynamic Endpoints - -The Bridge Example makes use of Dynamic Endpoints. Current SDK support is -limited for dynamic endpoints, since endpoints are typically defined (along with -the clusters and attributes they contain) in a .zap file which then generates -code and static structures to define the endpoints. - -To support endpoints that are not statically defined, the ZCL attribute storage -mechanisms will hold additional endpoint information for `NUM_DYNAMIC_ENDPOINTS` -additional endpoints. These additional endpoint structures must be defined by -the application and can change at runtime. - -To facilitate the creation of these endpoint structures, several macros are -defined: - -`DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(attrListName)` -`DECLARE_DYNAMIC_ATTRIBUTE(attId, attType, attSizeBytes, attrMask)` -`DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(clusterRevision)` - -- These three macros are used to declare a list of attributes for use within a - cluster. The declaration must begin with the - `DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN` macro which will define the name of - the allocated attribute structure. Each attribute is then added by the - `DECLARE_DYNAMIC_ATTRIBUTE` macro. Finally, - `DECLARE_DYNAMIC_ATTRIBUTE_LIST_END` macro should be used to close the - definition. - -- All attributes defined with these macros will be configured as - `ATTRIBUTE_MASK_EXTERNAL_STORAGE` in the ZCL database and therefore will - rely on the application to maintain storage for the attribute. Consequently, - reads or writes to these attributes must be handled within the application - by the `emberAfExternalAttributeWriteCallback` and - `emberAfExternalAttributeReadCallback` functions. See the bridge - application's `main.cpp` for an example of this implementation. - -`DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(clusterListName)` -`DECLARE_DYNAMIC_CLUSTER(clusterId, clusterAttrs, incomingCommands, outgoingCommands)` -`DECLARE_DYNAMIC_CLUSTER_LIST_END` - -- These three macros are used to declare a list of clusters for use within a - endpoint. The declaration must begin with the - `DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN` macro which will define the name of the - allocated cluster structure. Each cluster is then added by the - `DECLARE_DYNAMIC_CLUSTER` macro referencing attribute list previously - defined by the `DECLARE_DYNAMIC_ATTRIBUTE...` macros and the lists of - incoming/outgoing commands terminated by kInvalidCommandId (or nullptr if - there aren't any commands in the list). Finally, - `DECLARE_DYNAMIC_CLUSTER_LIST_END` macro should be used to close the - definition. - -`DECLARE_DYNAMIC_ENDPOINT(endpointName, clusterList)` - -- This macro is used to declare an endpoint and its associated cluster list, - which must be previously defined by the `DECLARE_DYNAMIC_CLUSTER...` macros. - -### Limitations - -Because code generation is dependent upon the clusters and attributes defined in -the .zap file (for static endpoint generation), it is necessary to include a -defined endpoint within the .zap that contains _all_ the clusters that may be -used on dynamic endpoints. On the bridge example, this is done on endpoint 1, -which is used as a 'dummy' endpoint that will be disabled at runtime. Endpoint 0 -is also defined in the .zap and contains the bridge basic and configuration -clusters as well as the root descriptor cluster. - -### Bridge Implementation Example - -The example demonstrates the use of dynamic endpoints and the concept of adding -and removing endpoints at runtime. First, the example declares a -`bridgedLightEndpoint` data structure for a Light endpoint with `OnOff`, -`Descriptor`, `BridgedDeviceBasicInformation`, and `FixedLabel` clusters. - -Using this declared endpoint structure, three endpoints for three bridged lights -are dynamically added at endpoint ID's `2`, `3`, and `4`, representing -`Light 1`, `Light 2`, and `Light 3` respectively. - -Then, endpoint `3` is removed, simulating the deletion of `Light 2`. - -A fourth light, `Light 4`, is then added occupying endpoint ID `5`. - -Finally, `Light 2` is re-added, and will occupy endpoint ID `6`. - -All endpoints populate the `Bridged Device Basic Information` and `Fixed Label` -clusters. In the `Bridged Device Basic Information` cluster, the `reachable` -attribute is simulated. In the `Fixed Label` cluster, the `LabelList` attribute -is simulated with the value/label pair `"room"`/`[light name]`. - -## Building - -- Install tool chain - - ``` - $ sudo apt-get install git gcc g++ python pkg-config libssl-dev libdbus-1-dev libglib2.0-dev ninja-build python3-venv python3-dev unzip - ``` - -- Build the example application: - - ``` - $ cd ~/connectedhomeip/examples/dynamic-bridge-app/linux - $ git submodule update --init - $ source third_party/connectedhomeip/scripts/activate.sh - $ gn gen out/debug - $ ninja -C out/debug - ``` - -- To delete generated executable, libraries and object files use: - - ``` - $ cd ~/connectedhomeip/examples/dynamic-bridge-app/linux - $ rm -rf out/ - ``` - -## Running the Complete Example on Raspberry Pi 4 - -- Prerequisites - - 1. A Raspberry Pi 4 board - 2. A USB Bluetooth Dongle, Ubuntu desktop will send Bluetooth advertisement, - which will block CHIP from connecting via BLE. On Ubuntu server, you need - to install `pi-bluetooth` via APT. - 3. Ubuntu 20.04 or newer image for ARM64 platform. - -- Building - - Follow [Building](#building) section of this document. - -- Running - - - [Optional] Plug USB Bluetooth dongle - - - Plug USB Bluetooth dongle and find its bluetooth device number. The - number after `hci` is the bluetooth device number, `1` in this - example. - - ``` - $ hciconfig - hci1: Type: Primary Bus: USB - BD Address: 00:1A:7D:AA:BB:CC ACL MTU: 310:10 SCO MTU: 64:8 - UP RUNNING PSCAN ISCAN - RX bytes:20942 acl:1023 sco:0 events:1140 errors:0 - TX bytes:16559 acl:1011 sco:0 commands:121 errors:0 - - hci0: Type: Primary Bus: UART - BD Address: B8:27:EB:AA:BB:CC ACL MTU: 1021:8 SCO MTU: 64:1 - UP RUNNING PSCAN ISCAN - RX bytes:8609495 acl:14 sco:0 events:217484 errors:0 - TX bytes:92185 acl:20 sco:0 commands:5259 errors:0 - ``` - - - Run Linux Bridge Example App - - ``` - $ cd ~/connectedhomeip/examples/dynamic-bridge-app/linux - $ sudo out/debug/dynamic-chip-bridge-app --ble-device [bluetooth device number] - # In this example, the device we want to use is hci1 - $ sudo out/debug/chip-bridge-app --ble-device 1 - ``` - - - Test the device using ChipDeviceController on your laptop / - workstation etc. diff --git a/examples/dynamic-bridge-app/linux/UserInputBackend.cpp b/examples/dynamic-bridge-app/linux/UserInputBackend.cpp deleted file mode 100644 index 5347919a552d30..00000000000000 --- a/examples/dynamic-bridge-app/linux/UserInputBackend.cpp +++ /dev/null @@ -1,588 +0,0 @@ -#include "Backend.h" -#include "DynamicDevice.h" -#include "main.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace { - -std::unique_ptr g_pending; - -// Pseudo-index representing the device being built. -static constexpr int kPendingDeviceIndex = -1; - -PropagateWriteCB g_write_cb = [](CommonCluster * cluster, const chip::app::ConcreteDataAttributePath & path, - chip::app::AttributeValueDecoder & decoder) -> CHIP_ERROR { - CHIP_ERROR ret = cluster->WriteFromBridge(path, decoder); - printf("Write to ep %d cluster %d attribute %d ret %" CHIP_ERROR_FORMAT "\n", path.mEndpointId, path.mClusterId, - path.mAttributeId, ret.Format()); - return ret; -}; - -const char * ParseValue(const std::vector & tokens, size_t index, std::string * v) -{ - if (index >= tokens.size()) - return "Missing argument"; - *v = tokens[index]; - return nullptr; -} -const char * ParseValue(const std::vector & tokens, size_t index, chip::Optional * v) -{ - if (index < tokens.size()) - v->SetValue(tokens[index]); - return nullptr; -} - -template ::value>> -const char * ParseValue(const std::vector & tokens, size_t index, T * v) -{ - if (index >= tokens.size()) - return "Missing argument"; - const char * start = tokens[index].data(); - const char * end = start + tokens[index].size(); - auto ret = std::from_chars(start, end, *v); - if (ret.ptr != end) - return "Cannot parse as integer"; - return nullptr; -} - -template ::value>> -const char * ParseValue(const std::vector & tokens, size_t index, chip::Optional * v) -{ - uint32_t temp; - if (!ParseValue(tokens, index, &temp)) - v->SetValue(temp); - return nullptr; -} - -const char * Parse(const std::vector & tokens, size_t index) -{ - if (index >= tokens.size()) - return nullptr; - return "Unexpected extra tokens"; -} - -template -const char * Parse(const std::vector & tokens, size_t index, T arg0, Args... args) -{ - auto ret = ParseValue(tokens, index, arg0); - return ret ? ret : Parse(tokens, index + 1, args...); -} - -void NewDevice(const std::vector & tokens) -{ - if (g_pending) - { - printf("Already pending device!\n"); - return; - } - - chip::Optional type; - const char * err = Parse(tokens, 0, &type); - if (err) - { - printf("Error: %s\nExpected [prebuilt-device-type]\n", err); - } - else if (!type.HasValue()) - { - g_pending = std::make_unique(); - } - else - { - printf("Unknown device type %s\nSupported types: switch\n", type.Value().c_str()); - } -} - -void AddCluster(const std::vector & tokens) -{ - if (!g_pending) - { - printf("Expected pending device! Run new-device\n"); - return; - } - std::string cluster_name; - const char * err = Parse(tokens, 0, &cluster_name); - if (err) - { - printf("Error: %s\n", err); - return; - } - - auto c = CreateCluster(cluster_name.c_str()); - if (c) - { - g_pending->AddCluster( - std::make_unique(std::move(c), c->GetIncomingCommandList(), c->GetOutgoingCommandList())); - } - else - { - printf("No such cluster '%s'\n", cluster_name.c_str()); - } -} - -void CancelDevice(const std::vector & tokens) -{ - const char * err = Parse(tokens, 0); - if (err) - { - printf("Error: %s\n", err); - return; - } - - g_pending.reset(nullptr); -} - -void FinishDevice(const std::vector & tokens) -{ - if (!g_pending) - { - printf("Expected pending device! Run new-device\n"); - return; - } - - const char * err = Parse(tokens, 0); - if (err) - { - printf("Error: %s\n", err); - return; - } - - for (auto * c : g_pending->clusters()) - c->SetCallback(&g_write_cb); - - int ep = AddDevice(std::move(g_pending)); - - if (ep < 0) - { - printf("Failed to add device\n"); - } - else - { - printf("Added device at index %d\n", ep); - } -} - -void RemoveDevice(const std::vector & tokens) -{ - uint32_t index; - const char * err = Parse(tokens, 0, &index); - if (err) - { - printf("Error: %s.\nExpected index of a device\n", err); - return; - } - if (!RemoveDeviceAt(index)) - { - printf("%d is an invalid index\n", index); - } -} - -void AddType(const std::vector & tokens) -{ - if (!g_pending) - { - printf("Expected pending device! Run new-device\n"); - return; - } - uint32_t type; - chip::Optional version; - const char * err = Parse(tokens, 0, &type, &version); - if (err) - { - printf("Error: %s.\nExpected: type [version]\n", err); - return; - } - EmberAfDeviceType devType = { (uint16_t) type, (uint8_t) version.ValueOr(1u) }; - printf("Adding device type %d ver %d\n", devType.deviceId, devType.deviceVersion); - - g_pending->AddDeviceType(devType); -} - -DynamicDevice * FindDevice(int32_t index) -{ - if (index == kPendingDeviceIndex) - { - return g_pending.get(); - } - else if ((uint32_t) index < g_device_impls.size()) - { - return g_device_impls[(uint32_t) index].get(); - } - else - { - return nullptr; - } -} - -Device * FindEndpoint(int32_t index) -{ - if (index >= 0 && (uint32_t) index < g_device_impls.size()) - { - return g_devices[(uint32_t) index].get(); - } - else - { - return nullptr; - } -} - -ClusterInterface * FindCluster(DynamicDevice * dev, const std::string & clusterId) -{ - uint32_t id; - const char * start = clusterId.data(); - const char * end = start + clusterId.size(); - if (std::from_chars(start, end, id).ptr != end) - { - auto r = LookupClusterByName(clusterId.c_str()); - if (r.HasValue()) - { - return nullptr; - } - id = r.Value(); - } - - for (auto * c : dev->clusters()) - { - if (c->GetClusterId() == id) - { - return c; - } - } - return nullptr; -} - -const EmberAfAttributeMetadata * FindAttrib(ClusterInterface * cluster, const std::string & attrId) -{ - AttributeInterface * attr = nullptr; - uint32_t id; - const char * start = attrId.data(); - const char * end = start + attrId.size(); - if (std::from_chars(start, end, id).ptr == end) - { - attr = cluster->FindAttribute(id); - } - if (!attr) - { - attr = cluster->FindAttributeByName(chip::CharSpan(attrId.data(), attrId.size())); - } - - return attr ? &attr->GetMetadata() : nullptr; -} - -void ParseValue(std::vector * data, uint16_t size, const std::string & str, EmberAfAttributeType type) -{ - chip::TLV::TLVWriter wr; - wr.Init(data->data(), data->size()); - switch (type) - { - case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: - case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: - wr.PutString(chip::TLV::AnonymousTag(), str.data(), (uint32_t) str.size()); - break; - case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: - case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: - wr.PutBytes(chip::TLV::AnonymousTag(), (const uint8_t *) str.data(), (uint32_t) str.size()); - break; - case ZCL_STRUCT_ATTRIBUTE_TYPE: - // Writing structs not supported yet - break; - case ZCL_SINGLE_ATTRIBUTE_TYPE: - wr.Put(chip::TLV::AnonymousTag(), (float) atof(str.c_str())); - break; - case ZCL_DOUBLE_ATTRIBUTE_TYPE: - wr.Put(chip::TLV::AnonymousTag(), atof(str.c_str())); - break; - case ZCL_INT8S_ATTRIBUTE_TYPE: - case ZCL_INT16S_ATTRIBUTE_TYPE: - case ZCL_INT24S_ATTRIBUTE_TYPE: - case ZCL_INT32S_ATTRIBUTE_TYPE: - case ZCL_INT40S_ATTRIBUTE_TYPE: - case ZCL_INT48S_ATTRIBUTE_TYPE: - case ZCL_INT56S_ATTRIBUTE_TYPE: - case ZCL_INT64S_ATTRIBUTE_TYPE: - wr.Put(chip::TLV::AnonymousTag(), (int64_t) strtoll(str.c_str(), nullptr, 10)); - break; - - case ZCL_INT8U_ATTRIBUTE_TYPE: - case ZCL_INT16U_ATTRIBUTE_TYPE: - case ZCL_INT24U_ATTRIBUTE_TYPE: - case ZCL_INT32U_ATTRIBUTE_TYPE: - case ZCL_INT40U_ATTRIBUTE_TYPE: - case ZCL_INT48U_ATTRIBUTE_TYPE: - case ZCL_INT56U_ATTRIBUTE_TYPE: - case ZCL_INT64U_ATTRIBUTE_TYPE: - wr.Put(chip::TLV::AnonymousTag(), (uint64_t) strtoll(str.c_str(), nullptr, 10)); - break; - - default: - // Assume integer - wr.Put(chip::TLV::AnonymousTag(), (int64_t) strtoll(str.c_str(), nullptr, 10)); - break; - } - wr.Finalize(); - data->resize(wr.GetLengthWritten()); -} - -void SetValue(const std::vector & tokens) -{ - std::string attrId; - int32_t index; - std::string clusterId; - std::string value; - const char * err = Parse(tokens, 0, &index, &clusterId, &attrId, &value); - if (err) - { - printf("Error: %s.\nExpected: deviceIndex clusterId attributeId value\nUse deviceIndex -1 for pending device.\n", err); - return; - } - - DynamicDevice * dev = FindDevice(index); - if (!dev) - { - printf("Could not find device at index %d\n", index); - return; - } - - ClusterInterface * cluster = FindCluster(dev, clusterId); - if (!cluster) - { - printf("Device does not implement cluster %s\nSupported clusters: ", clusterId.c_str()); - for (auto * c : dev->clusters()) - { - printf("%d ", c->GetClusterId()); - } - printf("\n"); - return; - } - - const EmberAfAttributeMetadata * attr = FindAttrib(cluster, attrId); - if (!attr) - { - printf("Cluster does not implement attr %s\nSupported attributes: ", attrId.c_str()); - for (auto attrMeta : cluster->GetAllAttributes()) - { - printf("%d ", attrMeta->GetId()); - } - printf("\n"); - return; - } - - std::vector data(attr->size + 64); - ParseValue(&data, attr->size, value, attr->attributeType); - - chip::TLV::TLVReader rd; - rd.Init(data.data(), data.size()); - rd.Next(); - - if (!cluster->Write(attr->attributeId, rd)) - { - printf("Write failed\n"); - } -} - -void AddRoom(const std::vector & tokens) -{ - if (tokens.size() != 1) - { - printf("Expected exactly one string\n"); - return; - } - auto room = FindRoom(tokens[0]); - if (room) - { - printf("Room already exists\n"); - return; - } -} - -void DelRoom(const std::vector & tokens) -{ - if (tokens.size() != 1) - { - printf("Expected exactly one string\n"); - return; - } - auto room = FindRoom(tokens[0]); - if (!room) - { - printf("No such room\n"); - return; - } - - room->SetName(std::string()); - while (room->GetEndpointListSize() > 0) - room->RemoveEndpoint(*room->GetEndpointListData()); -} - -void AddToRoom(const std::vector & tokens) -{ - int32_t index; - std::string room; - const char * err = Parse(tokens, 0, &room, &index); - if (err) - { - printf("Error: %s.\nExpected: room index.\n", err); - return; - } - auto roomPtr = FindRoom(tokens[0]); - if (!roomPtr) - { - printf("No such room\n"); - return; - } - auto dev = FindEndpoint(index); - if (!dev) - { - printf("No such device\n"); - return; - } - roomPtr->AddEndpoint(dev->GetEndpointId()); -} - -void DelFromRoom(const std::vector & tokens) -{ - int32_t index; - std::string room; - const char * err = Parse(tokens, 0, &room, &index); - if (err) - { - printf("Error: %s.\nExpected: room index.\n", err); - return; - } - auto roomPtr = FindRoom(tokens[0]); - if (!roomPtr) - { - printf("No such room\n"); - return; - } - auto dev = FindEndpoint(index); - if (!dev) - { - printf("No such device\n"); - return; - } - roomPtr->RemoveEndpoint(dev->GetEndpointId()); -} - -void SetParentId(const std::vector & tokens) -{ - if (!g_pending) - { - printf("Expected pending device! Run new-device\n"); - return; - } - - int32_t index; - const char * err = Parse(tokens, 0, &index); - if (err) - { - printf("Error: %s.\nExpected: deviceIndex\n", err); - return; - } - auto dev = FindEndpoint(index); - if (!dev) - { - printf("No such device\n"); - return; - } - g_pending->SetParentEndpointId(dev->GetEndpointId()); -} - -void Help(const std::vector & tokens); - -struct Command -{ - const char * name; - const char * desc; - void (*fn)(const std::vector & tokens); -} const commands[] = { - { "help", "", &Help }, - { "new-device", "[type] - Begin adding a new device. Add device types and clusters, then finish", &NewDevice }, - { "del-device", "index - Remove a device at the specified index", &RemoveDevice }, - { "add-cluster", "name - Add a cluster by name, eg FixedLabel", &AddCluster }, - { "finish-device", "Finish the currently pending device. Clusters and device types are immutable.", &FinishDevice }, - { "cancel-device", "Abort adding a new device", &CancelDevice }, - { "add-type", "id [version] - Add a device type by ID, optionally with a version", &AddType }, - { "set", "deviceIndex clusterId attributeId value - Set a value. deviceIndex -1 for adding device", &SetValue }, - { "set-parent-id", "deviceIndex - Set the parent endpoint ID to the specified device", &SetParentId }, - { "add-room", "name - Add a new named room", &AddRoom }, - { "del-room", "name - Remove an existing named room", &DelRoom }, - { "add-to-room", "name index - Add a device to a named room", &AddToRoom }, - { "del-from-room", "name index - Remove a device from a named room", &DelFromRoom }, -}; - -void Help(const std::vector & tokens) -{ - for (auto & cmd : commands) - { - printf("%s %s\n", cmd.name, cmd.desc); - } -} - -struct Op -{ - std::vector * tokens; - const Command * command; - std::promise lock; -}; -void ProcessLineOnMatterThread(intptr_t arg) -{ - Op * op = reinterpret_cast(arg); - op->command->fn(*op->tokens); - op->lock.set_value(); -} - -void ProcessLine(std::vector & tokens) -{ - for (auto & cmd : commands) - { - if (tokens[0] == cmd.name) - { - tokens.erase(tokens.begin()); - - Op op{ &tokens, &cmd }; - chip::DeviceLayer::PlatformMgr().ScheduleWork(&ProcessLineOnMatterThread, reinterpret_cast(&op)); - // Wait for command completion - op.lock.get_future().wait(); - return; - } - } - printf("Unknown command '%s'\n", tokens[0].c_str()); -} - -void * UserInputThread(void *) -{ - std::string line; - while (true) - { - printf("? "); - std::cin >> std::ws; - std::getline(std::cin, line); - if (std::cin.eof()) - break; - - std::istringstream iss(line); - std::vector tokens{ std::istream_iterator{ iss }, std::istream_iterator{} }; - - ProcessLine(tokens); - } - return nullptr; -} - -} // namespace - -void StartUserInput() -{ - pthread_t thread; - pthread_create(&thread, nullptr, &UserInputThread, nullptr); -} diff --git a/examples/dynamic-bridge-app/linux/bridge_service.cpp b/examples/dynamic-bridge-app/linux/bridge_service.cpp deleted file mode 100644 index 9a45fbd36c49d0..00000000000000 --- a/examples/dynamic-bridge-app/linux/bridge_service.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * - * Copyright (c) 2022 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 "bridge_service.h" - -#include "Backend.h" -#include "main.h" - -namespace chip { -namespace rpc { - -::pw::Status Bridge::Add(const ::chip_rpc_bridge_AddDevice & request, ::chip_rpc_bridge_AddDeviceResponse & response) -{ - std::unique_ptr pending; - - pending = std::make_unique(); - pending->SetParentEndpointId(request.parent_endpoint); - - for (pb_size_t i = 0; i < request.clusters_count; i++) - { - const chip_rpc_bridge_Cluster & c = request.clusters[i]; - - auto cluster = CreateCluster(c.cluster_id); - if (!cluster) - { - return pw::Status::InvalidArgument(); - } - - pending->AddCluster(std::make_unique(std::move(cluster))); - } - - for (pb_size_t i = 0; i < request.device_types_count; i++) - { - EmberAfDeviceType devType = { (uint16_t) request.device_types[i].id, (uint8_t) request.device_types[i].version }; - pending->AddDeviceType(devType); - } - - int ret = AddDevice(std::move(pending)); - if (ret < 0) - { - return pw::Status::Aborted(); - } - response.id = ret; - return pw::OkStatus(); -} - -::pw::Status Bridge::Remove(const ::chip_rpc_bridge_RemoveDevice & request, ::chip_rpc_bridge_Empty & response) -{ - if (!RemoveDeviceAt(request.id)) - { - return pw::Status::NotFound(); - } - - return pw::OkStatus(); -} - -} // namespace rpc -} // namespace chip diff --git a/examples/dynamic-bridge-app/linux/bridge_service.h b/examples/dynamic-bridge-app/linux/bridge_service.h deleted file mode 100644 index 4e5cc1e057b4dc..00000000000000 --- a/examples/dynamic-bridge-app/linux/bridge_service.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "app/util/attribute-storage.h" -#include "bridge_service/bridge_service.rpc.pb.h" -#include "pigweed/rpc_services/internal/StatusUtils.h" -#include - -namespace chip { -namespace rpc { - -class Bridge : public bridge::pw_rpc::nanopb::Bridge::Service -{ -public: - Bridge() = default; - - virtual ~Bridge() = default; - - ::pw::Status Add(const ::chip_rpc_bridge_AddDevice & request, ::chip_rpc_bridge_AddDeviceResponse & response); - - ::pw::Status Remove(const ::chip_rpc_bridge_RemoveDevice & request, ::chip_rpc_bridge_Empty & response); -}; - -} // namespace rpc -} // namespace chip diff --git a/examples/dynamic-bridge-app/linux/bridged-actions-stub.cpp b/examples/dynamic-bridge-app/linux/bridged-actions-stub.cpp deleted file mode 100644 index 3a1e3be9ac7829..00000000000000 --- a/examples/dynamic-bridge-app/linux/bridged-actions-stub.cpp +++ /dev/null @@ -1,136 +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. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ActionCluster.h" -#include "main.h" - -using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::Actions::Attributes; - -namespace { - -class ActionsAttrAccess : public AttributeAccessInterface -{ -public: - // Register for the Actions cluster on all endpoints. - ActionsAttrAccess() : AttributeAccessInterface(Optional::Missing(), Actions::Id) {} - - CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - -private: - static constexpr uint16_t ClusterRevision = 1; - - CHIP_ERROR ReadActionListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); - CHIP_ERROR ReadEndpointListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); - CHIP_ERROR ReadSetupUrlAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); - CHIP_ERROR ReadClusterRevision(EndpointId endpoint, AttributeValueEncoder & aEncoder); -}; - -constexpr uint16_t ActionsAttrAccess::ClusterRevision; - -CHIP_ERROR ActionsAttrAccess::ReadActionListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) -{ - CHIP_ERROR err = aEncoder.EncodeList([&endpoint](const auto & encoder) -> CHIP_ERROR { - chip::Span actionList = GetActionListInfo(endpoint); - - for (auto action : actionList) - { - if (action->getIsVisible()) - { - Actions::Structs::ActionStruct::Type actionStruct = { action->getActionId(), - CharSpan::fromCharString(action->getName().c_str()), - action->getType(), - action->getEndpointListId(), - action->getSupportedCommands(), - action->getStatus() }; - ReturnErrorOnFailure(encoder.Encode(actionStruct)); - } - } - - return CHIP_NO_ERROR; - }); - return err; -} - -CHIP_ERROR ActionsAttrAccess::ReadEndpointListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) -{ - CHIP_ERROR err = aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { - for (auto & room : gRooms) - { - if (room.GetEndpointListSize() == 0) - continue; - Actions::Structs::EndpointListStruct::Type endpointListStruct = { - room.GetEndpointListId(), CharSpan::fromCharString(room.GetName().c_str()), room.GetType(), - DataModel::List(room.GetEndpointListData(), room.GetEndpointListSize()) - }; - ReturnErrorOnFailure(encoder.Encode(endpointListStruct)); - } - return CHIP_NO_ERROR; - }); - return err; -} - -CHIP_ERROR ActionsAttrAccess::ReadSetupUrlAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) -{ - const char SetupUrl[] = "https://example.com"; - return aEncoder.Encode(chip::CharSpan::fromCharString(SetupUrl)); -} - -CHIP_ERROR ActionsAttrAccess::ReadClusterRevision(EndpointId endpoint, AttributeValueEncoder & aEncoder) -{ - return aEncoder.Encode(ClusterRevision); -} - -ActionsAttrAccess gAttrAccess; - -CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - VerifyOrDie(aPath.mClusterId == Actions::Id); - - switch (aPath.mAttributeId) - { - case ActionList::Id: - return ReadActionListAttribute(aPath.mEndpointId, aEncoder); - case EndpointLists::Id: - return ReadEndpointListAttribute(aPath.mEndpointId, aEncoder); - case SetupURL::Id: - return ReadSetupUrlAttribute(aPath.mEndpointId, aEncoder); - case ClusterRevision::Id: - return ReadClusterRevision(aPath.mEndpointId, aEncoder); - default: - break; - } - return CHIP_NO_ERROR; -} -} // anonymous namespace - -void MatterActionsPluginServerInitCallback(void) -{ - registerAttributeAccessOverride(&gAttrAccess); -} diff --git a/examples/dynamic-bridge-app/linux/build b/examples/dynamic-bridge-app/linux/build deleted file mode 120000 index d56ed62ae4d1ff..00000000000000 --- a/examples/dynamic-bridge-app/linux/build +++ /dev/null @@ -1 +0,0 @@ -third_party/connectedhomeip/build \ No newline at end of file diff --git a/examples/dynamic-bridge-app/linux/entrypoint.sh b/examples/dynamic-bridge-app/linux/entrypoint.sh deleted file mode 100755 index 6551db22f262ef..00000000000000 --- a/examples/dynamic-bridge-app/linux/entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -service dbus start -sleep 1 -service avahi-daemon start -/usr/sbin/otbr-agent -I wpan0 spinel+hdlc+uart:///dev/ttyUSB0 & -sleep 1 -ot-ctl panid 0x1234 -ot-ctl ifconfig up -ot-ctl thread start - -dynamic-chip-bridge-app diff --git a/examples/dynamic-bridge-app/linux/include/ActionCluster.h b/examples/dynamic-bridge-app/linux/include/ActionCluster.h deleted file mode 100644 index a5a830c044710d..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/ActionCluster.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include -#include - -class Action -{ -public: - Action(uint16_t actionId, std::string name, chip::app::Clusters::Actions::ActionTypeEnum type, uint16_t endpointListId, - uint16_t supportedCommands, chip::app::Clusters::Actions::ActionStateEnum status, bool isVisible); - inline void setName(std::string name) { mName = name; }; - inline std::string getName() { return mName; }; - inline chip::app::Clusters::Actions::ActionTypeEnum getType() { return mType; }; - inline chip::app::Clusters::Actions::ActionStateEnum getStatus() { return mStatus; }; - inline uint16_t getActionId() { return mActionId; }; - inline uint16_t getEndpointListId() { return mEndpointListId; }; - inline uint16_t getSupportedCommands() { return mSupportedCommands; }; - inline void setIsVisible(bool isVisible) { mIsVisible = isVisible; }; - inline bool getIsVisible() { return mIsVisible; }; - -private: - std::string mName; - chip::app::Clusters::Actions::ActionTypeEnum mType; - chip::app::Clusters::Actions::ActionStateEnum mStatus; - uint16_t mActionId; - uint16_t mEndpointListId; - uint16_t mSupportedCommands; - bool mIsVisible; -}; diff --git a/examples/dynamic-bridge-app/linux/include/Clusters.h b/examples/dynamic-bridge-app/linux/include/Clusters.h deleted file mode 100644 index 18bfbbaf07b71b..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/Clusters.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "GeneratedClusters.h" -#include "data-model/Attribute.h" - -// This is the interface to cluster implementations, providing access to manipulate attributes. -class ClusterInterface -{ -public: - virtual ~ClusterInterface() = default; - - // Set the endpoint for this cluster. - virtual void SetEndpointId(chip::EndpointId id) = 0; - // Get the ID for this cluster. - virtual chip::ClusterId GetClusterId() = 0; - // Gets the list of enabled attributes for this cluster. - virtual chip::Span GetAllAttributes() = 0; - // Find an attribute of this cluster, if present. - virtual AttributeInterface * FindAttribute(chip::AttributeId id) = 0; - // Find an attribute of this cluster, if present, given its name. - virtual AttributeInterface * FindAttributeByName(chip::CharSpan name) = 0; - // Write the given TLV encoded value to the given attribute. Can write - // normally read-only values. Nofitied matter that the value has changed. - virtual bool Write(chip::AttributeId attr, chip::TLV::TLVReader & reader) = 0; -}; - -struct CommonCluster; -typedef std::function - PropagateWriteCB; - -// This provides the backend access to implementation details. -struct CommonCluster : public ClusterInterface -{ - CommonCluster(std::unique_ptr cluster); - ~CommonCluster(); - - void SetEndpointId(chip::EndpointId id) override; - chip::EndpointId GetEndpointId() const; - - chip::ClusterId GetClusterId() override; - - void SetCallback(PropagateWriteCB * cb); - - bool active() const; - - // Implemented by generated code. Valid writes should be forwarded to ForwardWriteToBridge. - virtual CHIP_ERROR WriteFromBridge(const chip::app::ConcreteDataAttributePath & aPath, - chip::app::AttributeValueDecoder & aDecoder); - - // Calls the registered callback if one exists, otherwise triggers a write of the actual - // stored value. - CHIP_ERROR ForwardWriteToBridge(const chip::app::ConcreteDataAttributePath & aPath, - chip::app::AttributeValueDecoder & aDecoder); - - chip::Span GetAllAttributes() override; - AttributeInterface * FindAttribute(chip::AttributeId id) override; - AttributeInterface * FindAttributeByName(chip::CharSpan name) override; - - // Force a write of a given attribute. Can write normally read-only values. - // Calls OnUpdated after the write finishes. - bool Write(chip::AttributeId attr, chip::TLV::TLVReader & reader) override; - - // Push an attribute update notification to the matter stack. - void OnUpdated(chip::AttributeId attr); - - template - void OnUpdated(const T & attr) - { - OnUpdated(attr.GetId()); - } - -protected: - chip::EndpointId mEndpoint = 0xFFFF; - PropagateWriteCB * mCallback = nullptr; - std::vector mAttributes; - std::unique_ptr mStorage; -}; diff --git a/examples/dynamic-bridge-app/linux/include/Device.h b/examples/dynamic-bridge-app/linux/include/Device.h deleted file mode 100644 index 1ecf4d6bac4f2e..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/Device.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include -#include - -#include "Clusters.h" - -// This represents a single logical device occupying one endpoint. A composed device consists of multiple -// Device objects that reference a tree. -class Device -{ -public: - Device(chip::Span dataVersions, chip::Span clusters, - chip::Span clusterImpl, const chip::Span & deviceTypeList, - chip::EndpointId parentId); - ~Device() = default; - - const chip::Span & versions() { return mDataVersions; } - const chip::Span & deviceTypes() { return mDeviceTypeList; } - const EmberAfEndpointType * endpointType() { return &mEndpointType; } - const chip::Span & clusters() { return mClusterImpl; } - - void SetEndpointId(chip::EndpointId id); - chip::EndpointId GetEndpointId() { return mEndpointId; } - chip::EndpointId GetParentEndpointId() { return mParentEndpointId; } - - const char * GetName(); - void SetName(const char * name); - -private: - chip::EndpointId mParentEndpointId; - chip::EndpointId mEndpointId; - chip::Span mDataVersions; - chip::Span mClusters; - chip::Span mClusterImpl; - chip::Span mDeviceTypeList; - EmberAfEndpointType mEndpointType; - std::string mDeviceName; -}; - -int AddDeviceEndpoint(Device * dev); -int RemoveDeviceEndpoint(Device * dev); -Device * FindDeviceEndpoint(chip::EndpointId id); diff --git a/examples/dynamic-bridge-app/linux/include/DynamicDevice.h b/examples/dynamic-bridge-app/linux/include/DynamicDevice.h deleted file mode 100644 index 07bddb237e76ae..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/DynamicDevice.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * - * Copyright (c) 2022 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 "Device.h" -#include "GeneratedClusters.h" - -#include -#include - -// This file provides implementations that use dynamic storage -struct DynamicCluster : public CommonCluster -{ - DynamicCluster(std::unique_ptr impl, const chip::CommandId * incomingCommands = nullptr, - const chip::CommandId * outgoingCommands = nullptr) : - CommonCluster(std::move(impl)), - mIncomingCommands(incomingCommands), mOutgoingCommands(outgoingCommands) - { - for (auto & attr : mAttributes) - mAttributeDecls.push_back(attr->GetMetadata()); - } - - std::vector mAttributeDecls; - const chip::CommandId * mIncomingCommands; - const chip::CommandId * mOutgoingCommands; -}; - -class DynamicDevice -{ -public: - DynamicDevice(); - - template - DynamicDevice(Types &... clusters) - {} - - virtual ~DynamicDevice() = default; - - void SetParentEndpointId(chip::EndpointId id) { mParentEndpointId = id; } - - void AddDeviceType(EmberAfDeviceType type); - - // Add each cluster that the device will ever use. - DynamicDevice & AddCluster(std::unique_ptr cluster, const chip::Span & attribs, - const chip::CommandId * incomingCommands, const chip::CommandId * outgoingCommands); - DynamicDevice & AddCluster(CommonCluster * cluster, const chip::Span & attribs, - const chip::CommandId * incomingCommands, const chip::CommandId * outgoingCommands); - - DynamicDevice & AddCluster(std::unique_ptr cluster); - - // After setting all options, create the device. - Device CreateDevice(); - - const std::vector & clusters() const { return mClusterRawPtrs; } - -private: - std::vector> mClusters; - std::vector mClusterRawPtrs; - std::vector mClusterBaseRawPtrs; - - std::vector mClusterDecls; - - std::vector mVersions; - - std::vector mDeviceTypes; - - chip::EndpointId mParentEndpointId = 1; -}; diff --git a/examples/dynamic-bridge-app/linux/include/GeneratedClusters.h b/examples/dynamic-bridge-app/linux/include/GeneratedClusters.h deleted file mode 100644 index 02ad1aaeaf7423..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/GeneratedClusters.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include -#include - -#include - -#include "data-model/Attribute.h" - -// Required for default initialization of cluster revisions. -static constexpr uint16_t ZCL_DESCRIPTOR_CLUSTER_REVISION = 1; -static constexpr uint16_t ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_REVISION = 1; -static constexpr uint16_t ZCL_FIXED_LABEL_CLUSTER_REVISION = 1; -static constexpr uint16_t ZCL_ON_OFF_CLUSTER_REVISION = 4; -static constexpr uint16_t ZCL_SWITCH_CLUSTER_REVISION = 1; -static constexpr uint16_t ZCL_LEVEL_CONTROL_CLUSTER_REVISION = 1; -static constexpr uint16_t ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_REVISION = 1; - -class GeneratedCluster -{ -public: - virtual ~GeneratedCluster() = default; - // Get the ID for this cluster. - virtual chip::ClusterId GetClusterId() = 0; - // Gets the list of available attributes for this cluster. - virtual std::vector GetAttributes() = 0; - - // Returns a list of client to server commands. Can be nullptr or terminated by 0xFFFF_FFFF. - // The returned list mirrors the `acceptedCommandList` field in `EmberAfCluster` - // This function is used to pass a command list when creating a `DynamicCluster` and its underlying `EmberAfCluster`. See - // `AddCluster` in `UserInputBackend`. - virtual const chip::CommandId * GetIncomingCommandList() { return nullptr; } - - // Returns a list of server generated commands (responses to client commands). Can be nullptr or terminated by 0xFFFF_FFFF. - // The returned list mirrors the `generatedCommandList` field in `EmberAfCluster` - // This function is used to pass a command list when creating a `DynamicCluster` and its underlying `EmberAfCluster`. See - // `AddCluster` in `UserInputBackend`. - virtual const chip::CommandId * GetOutgoingCommandList() { return nullptr; } -}; diff --git a/examples/dynamic-bridge-app/linux/include/data-model/Attribute.h b/examples/dynamic-bridge-app/linux/include/data-model/Attribute.h deleted file mode 100644 index aad7f9f65a68b0..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/data-model/Attribute.h +++ /dev/null @@ -1,104 +0,0 @@ -#pragma once - -#include -#include - -#include "DataModel.h" - -// This is the interface to the attribute implementation that permits retrieval of metadata about -// the attribute as well as set/get the underlying value. -class AttributeInterface -{ -public: - virtual ~AttributeInterface() = default; - - // Get the ID of this attribute. Shortcut for GetMetadata().attributeId - virtual chip::AttributeId GetId() = 0; - // Get the metadata of this attribute, suitable for advertising. - virtual const EmberAfAttributeMetadata & GetMetadata() = 0; - - virtual chip::CharSpan GetName() = 0; - - // List attribes should override these to get list write notifications. - virtual void ListWriteBegin(const chip::app::ConcreteAttributePath & aPath) {} - virtual void ListWriteEnd(const chip::app::ConcreteAttributePath & aPath, bool aWriteWasSuccessful) {} - - // Write a single value to the attribute. - virtual CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) = 0; - - // Read the contents of the attribute. - virtual CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) = 0; - - virtual CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::TLV::TLVWriter & writer) = 0; -}; - -// This is the base type for implementing an attribute -template -struct Attribute : public AttributeInterface -{ - Attribute(chip::CharSpan name, chip::AttributeId id, EmberAfAttributeMask mask, EmberAfAttributeType type, size_t size, - Type value = Type()) : - mMetadata(EmberAfAttributeMetadata{ ZAP_EMPTY_DEFAULT(), id, (uint16_t) size, type, mask }), - mData(value), mName(name) - {} - - chip::AttributeId GetId() override { return mMetadata.attributeId; } - const EmberAfAttributeMetadata & GetMetadata() override { return mMetadata; } - chip::CharSpan GetName() override { return mName; } - - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override - { - return chip::app::DataModel::Decode(aPath, aDecoder, mData); - } - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override - { - return chip::app::DataModel::Encode(aPath, aEncoder, mData); - } - - template >::value, bool> = true> - CHIP_ERROR ReadValue(const chip::app::ConcreteReadAttributePath & aPath, chip::TLV::TLVWriter & writer, Type & value) - { - return chip::app::DataModel::Encode(aPath, writer, chip::TLV::AnonymousTag(), value); - } - - template >::value, bool> = true> - CHIP_ERROR ReadValue(const chip::app::ConcreteReadAttributePath & aPath, chip::TLV::TLVWriter & writer, Type & value) - { - return chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), value); - } - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::TLV::TLVWriter & writer) override - { - return ReadValue(aPath, writer, mData); - } - - void operator=(const Type & value) { mData = value; } - const Type & Peek() const { return mData; } - -protected: - EmberAfAttributeMetadata mMetadata; - Type mData; - chip::CharSpan mName; -}; - -// This specialization handles list writes and reverts if the write fails. -template -struct ListAttribute : public Attribute -{ - using Attribute::Attribute; - - void ListWriteBegin(const chip::app::ConcreteAttributePath & aPath) override { mBackup = this->mData; } - void ListWriteEnd(const chip::app::ConcreteAttributePath & aPath, bool aWriteWasSuccessful) override - { - if (aWriteWasSuccessful) - { - mBackup = Type(); - } - else - { - this->mData = std::move(mBackup); - } - } - - Type mBackup; -}; diff --git a/examples/dynamic-bridge-app/linux/include/data-model/DataModel.h b/examples/dynamic-bridge-app/linux/include/data-model/DataModel.h deleted file mode 100644 index 053cd785aac472..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/data-model/DataModel.h +++ /dev/null @@ -1,325 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -#include -#include - -namespace chip { -namespace app { -namespace DataModel { - -// Container requirements. -// To encode and decode as a list the following must be present -// void clear(); -// size_type size(); -// T& back(); -// void emplace_back(); -// iterator_type begin(); -// iterator_type end(); -// iterator_type must conform to LegacyForwardIterator -// The contained type must be default-constructible -template -class IsList -{ - typedef char yes; - typedef long no; - - template - static yes test(decltype(&U::size)); - template - static no test(...); - -public: - static constexpr bool value = sizeof(test(0)) == sizeof(yes); -}; - -template -struct IsOptionalOrNullable -{ - static constexpr bool value = false; -}; -template -struct IsOptionalOrNullable> -{ - static constexpr bool value = true; -}; -template -struct IsOptionalOrNullable> -{ - static constexpr bool value = true; -}; - -static_assert(IsList>::value, "Vector of chars must be a list"); - -template >::value && !IsList>::value, bool> = true> -CHIP_ERROR Encode(const ConcreteReadAttributePath &, AttributeValueEncoder & aEncoder, const X & x) -{ - return aEncoder.Encode(x); -} - -/* - * @brief - * Lists that are string-like should be encoded as char/byte spans. - * Encode using a given AttributeValueEncoder. - */ -template < - typename X, - std::enable_if_t>::value && sizeof(std::decay_t) == sizeof(char), bool> = true> -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder, const X & x) -{ - return aEncoder.Encode(Span>(x.data(), x.size())); -} - -/* - * @brief - * Lists that are string-like should be encoded as char/byte spans. - * Encode using a given TLVWriter. - */ -template < - typename X, - std::enable_if_t>::value && sizeof(std::decay_t) == sizeof(char), bool> = true> -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, TLV::TLVWriter & writer, TLV::Tag tag, const X & x) -{ - return writer.Put(tag, Span>(x.data(), x.size())); -} - -/* - * @brief - * - * If an item is requested from a list, encode just that single item, or the entire list otherwise. - * - * Encodes items using a given AttributeValueEncoder. - * - * The object must satisfy the following constraints - * size() must return an integer - * begin() must return a type conforming to LegacyRandomAccessIterator - * - * This is const X& instead of X&& because it is "more specialized" and so this overload will - * be chosen if possible. - */ -template < - typename X, - std::enable_if_t>::value && (sizeof(std::decay_t) > sizeof(char)), bool> = true> -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder, const X & x) -{ - if (aPath.mListIndex.HasValue()) - { - uint16_t index = aPath.mListIndex.Value(); - if (index >= x.size()) - return CHIP_ERROR_INVALID_ARGUMENT; - - auto it = x.begin(); - std::advance(it, index); - return aEncoder.Encode(*it); - } - return aEncoder.EncodeList([x](const auto & encoder) { - CHIP_ERROR err = CHIP_NO_ERROR; - for (auto & v : x) - { - err = encoder.Encode(v); - if (err != CHIP_NO_ERROR) - break; - } - return err; - }); -} - -/* - * @brief - * - * If an item is requested from a list, encode just that single item, or the entire list otherwise. - * - * Encodes items using a given TLVWriter. - * - * The object must satisfy the following constraints - * size() must return an integer - * begin() must return a type conforming to LegacyRandomAccessIterator - * - * This is const X& instead of X&& because it is "more specialized" and so this overload will - * be chosen if possible. - */ -template < - typename X, - std::enable_if_t>::value && (sizeof(std::decay_t) > sizeof(char)), bool> = true> -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, TLV::TLVWriter & writer, TLV::Tag tag, const X & x) -{ - if (aPath.mListIndex.HasValue()) - { - uint16_t index = aPath.mListIndex.Value(); - if (index >= x.size()) - return CHIP_ERROR_INVALID_ARGUMENT; - - auto it = x.begin(); - std::advance(it, index); - return Encode(writer, tag, *it); - } - TLV::TLVType type; - - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Array, type)); - for (auto & item : x) - { - ReturnErrorOnFailure(Encode(writer, tag, item)); - } - ReturnErrorOnFailure(writer.EndContainer(type)); - return CHIP_NO_ERROR; -} - -/* - * @brief - * Set of overloaded encode methods that can be called from AttributeAccessInterface::Read - */ -template -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder, const Optional & x) -{ - if (x.HasValue()) - { - return Encode(aPath, aEncoder, x.Value()); - } - // If no value, just do nothing. - return CHIP_NO_ERROR; -} - -/* - * @brief - * - * Encodes a nullable value. - */ -template -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder, const Nullable & x) -{ - if (x.IsNull()) - { - return aEncoder.EncodeNull(); - } - - // Allow sending invalid values for nullables when - // CONFIG_BUILD_FOR_HOST_UNIT_TEST is true, so we can test how the other side - // responds. -#if !CONFIG_BUILD_FOR_HOST_UNIT_TEST - if (!x.ExistingValueInEncodableRange()) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } -#endif // !CONFIG_BUILD_FOR_HOST_UNIT_TEST - - // The -Wmaybe-uninitialized warning gets confused about the fact - // that x.mValue is always initialized if x.IsNull() is not - // true, so suppress it for our access to x.Value(). -#pragma GCC diagnostic push -#if !defined(__clang__) -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif // !defined(__clang__) - return Encode(aPath, aEncoder, x.Value()); -#pragma GCC diagnostic pop -} - -template >::value && !IsList>::value, bool> = true> -CHIP_ERROR Decode(const ConcreteDataAttributePath &, AttributeValueDecoder & aDecoder, X & x) -{ - return aDecoder.Decode(x); -} - -/* - * @brief - * Lists that are string-like should be decoded as char/byte spans. - */ -template < - typename X, - std::enable_if_t>::value && sizeof(std::decay_t) == sizeof(char), bool> = true> -CHIP_ERROR Decode(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder, X & x) -{ - Span> span; - CHIP_ERROR err = aDecoder.Decode(span); - if (err == CHIP_NO_ERROR) - { - x = X(span.data(), span.size()); - } - return err; -} - -template < - typename X, - std::enable_if_t>::value && (sizeof(std::decay_t) > sizeof(char)), bool> = true> -CHIP_ERROR Decode(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder, X & x) -{ - switch (aPath.mListOp) - { - case ConcreteDataAttributePath::ListOperation::DeleteItem: - if (aPath.mListIndex >= x.size()) - { - return CHIP_ERROR_INVALID_LIST_LENGTH; - } - else - { - auto it = x.begin(); - std::advance(it, aPath.mListIndex); - x.erase(it); - return CHIP_NO_ERROR; - } - - case ConcreteDataAttributePath::ListOperation::ReplaceItem: - if (aPath.mListIndex >= x.size()) - { - return CHIP_ERROR_INVALID_LIST_LENGTH; - } - else - { - auto it = x.begin(); - std::advance(it, aPath.mListIndex); - return aDecoder.Decode(*it); - } - - case ConcreteDataAttributePath::ListOperation::ReplaceAll: - x.clear(); - FALLTHROUGH; - default: - x.emplace_back(); - return aDecoder.Decode(x.back()); - } -} - -/* - * @brief - * - * Decodes an optional value (struct field, command field, event field). - */ -template -CHIP_ERROR Decode(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder, Optional & x) -{ - // If we are calling this, it means we found the right tag, so just decode - // the item. - return Decode(aPath, aDecoder, x.HasValue() ? x.Value() : x.Emplace()); -} - -/* - * @brief - * - * Decodes a nullable value. - */ -template -CHIP_ERROR Decode(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder, Nullable & x) -{ - if (aDecoder.WillDecodeNull()) - { - x.SetNull(); - return CHIP_NO_ERROR; - } - - // We have a value; decode it. - ReturnErrorOnFailure(Decode(aPath, aDecoder, x.SetNonNull())); - if (!x.ExistingValueInEncodableRange()) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } - return CHIP_NO_ERROR; -} - -} // namespace DataModel -} // namespace app -} // namespace chip diff --git a/examples/dynamic-bridge-app/linux/include/main.h b/examples/dynamic-bridge-app/linux/include/main.h deleted file mode 100644 index d11982d85fbc55..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/main.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include "ActionCluster.h" -#include "Device.h" -#include "GeneratedClusters.h" - -#include - -class Room -{ -public: - Room() = default; - void SetName(std::string name) { mName = name; } - const std::string & GetName() { return mName; } - chip::app::Clusters::Actions::EndpointListTypeEnum GetType() { return mType; }; - uint16_t GetEndpointListId() { return mEndpointListId; }; - chip::EndpointId * GetEndpointListData() { return mEndpoints.data(); }; - size_t GetEndpointListSize() { return mEndpoints.size(); }; - - void AddEndpoint(chip::EndpointId ep) { mEndpoints.push_back(ep); } - void RemoveEndpoint(chip::EndpointId ep) - { - auto it = std::find(mEndpoints.begin(), mEndpoints.end(), ep); - if (it != mEndpoints.end()) - mEndpoints.erase(it); - } - -private: - std::string mName; - uint16_t mEndpointListId = 0; - chip::app::Clusters::Actions::EndpointListTypeEnum mType; - std::vector mEndpoints; -}; - -static constexpr uint32_t kMaxRooms = 16; -extern Room gRooms[kMaxRooms]; - -Room * FindRoom(const std::string & name); - -chip::Span GetActionListInfo(chip::EndpointId parentId); - -chip::Optional LookupClusterByName(const char * name); -std::unique_ptr CreateCluster(const char * name); -std::unique_ptr CreateCluster(chip::ClusterId id); -EmberAfStatus HandleReadOnOffAttribute(Attribute * attribute, uint8_t * buffer, uint16_t maxReadLength); -EmberAfStatus HandleWriteOnOffAttribute(Attribute * attribute, uint8_t * buffer); diff --git a/examples/dynamic-bridge-app/linux/main.cpp b/examples/dynamic-bridge-app/linux/main.cpp deleted file mode 100644 index e91f8d4d4e95ee..00000000000000 --- a/examples/dynamic-bridge-app/linux/main.cpp +++ /dev/null @@ -1,576 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "ActionCluster.h" -#include "Backend.h" -#include "CommissionableInit.h" -#include "Device.h" -#include "main.h" -#include - -#include "AppMain.h" - -#include "bridge/BridgeClustersImpl.h" - -#ifdef PW_RPC_ENABLED -#include "Rpc.h" -#include "bridge_service.h" -#include "pw_rpc_system_server/rpc_server.h" -static chip::rpc::Bridge bridge_service; -#endif - -#include -#include -#include - -using namespace chip; -using namespace chip::Credentials; -using namespace chip::Inet; -using namespace chip::Transport; -using namespace chip::DeviceLayer; -using namespace chip::app::Clusters; - -static EndpointId gCurrentEndpointId; -static EndpointId gFirstDynamicEndpointId; -static Device * gDevices[CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT]; -Room gRooms[kMaxRooms]; - -struct CommonAttributeAccessInterface : public chip::app::AttributeAccessInterface -{ - using chip::app::AttributeAccessInterface::AttributeAccessInterface; - - // Find a cluster given a specific endpoint/cluster. Returns nullptr if no such - // cluster exists at that path. - static CommonCluster * FindCluster(const chip::app::ConcreteClusterPath & path); - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, TLV::TLVWriter & writer); - - void OnListWriteBegin(const chip::app::ConcreteAttributePath & aPath) override; - void OnListWriteEnd(const chip::app::ConcreteAttributePath & aPath, bool aWriteWasSuccessful) override; -}; - -CommonCluster * CommonAttributeAccessInterface::FindCluster(const chip::app::ConcreteClusterPath & path) -{ - Device * dev = FindDeviceEndpoint(path.mEndpointId); - if (dev) - { - for (auto c : dev->clusters()) - { - if (c->GetClusterId() == path.mClusterId) - { - return static_cast(c); - } - } - } - return nullptr; -} - -CHIP_ERROR CommonAttributeAccessInterface::Read(const chip::app::ConcreteReadAttributePath & aPath, - chip::app::AttributeValueEncoder & aEncoder) -{ - CommonCluster * c = FindCluster(aPath); - if (!c) - { - return CHIP_ERROR_NOT_FOUND; - } - AttributeInterface * a = c->FindAttribute(aPath.mAttributeId); - if (!a) - { - return CHIP_ERROR_NOT_FOUND; - } - return a->Read(aPath, aEncoder); -} - -CHIP_ERROR CommonAttributeAccessInterface::Write(const chip::app::ConcreteDataAttributePath & aPath, - chip::app::AttributeValueDecoder & aDecoder) -{ - CommonCluster * c = FindCluster(aPath); - if (!c) - { - return CHIP_ERROR_NOT_FOUND; - } - return c->ForwardWriteToBridge(aPath, aDecoder); -} - -CHIP_ERROR CommonAttributeAccessInterface::Read(const chip::app::ConcreteReadAttributePath & aPath, chip::TLV::TLVWriter & writer) -{ - CommonCluster * c = FindCluster(aPath); - if (!c) - { - return CHIP_ERROR_NOT_FOUND; - } - AttributeInterface * a = c->FindAttribute(aPath.mAttributeId); - if (!a) - { - return CHIP_ERROR_NOT_FOUND; - } - return a->Read(aPath, writer); -} - -void CommonAttributeAccessInterface::OnListWriteBegin(const chip::app::ConcreteAttributePath & aPath) -{ - CommonCluster * c = FindCluster(aPath); - if (c) - { - AttributeInterface * a = c->FindAttribute(aPath.mAttributeId); - if (a) - { - a->ListWriteBegin(aPath); - } - } -} - -void CommonAttributeAccessInterface::OnListWriteEnd(const chip::app::ConcreteAttributePath & aPath, bool aWriteWasSuccessful) -{ - CommonCluster * c = FindCluster(aPath); - if (c) - { - AttributeInterface * a = c->FindAttribute(aPath.mAttributeId); - if (a) - { - a->ListWriteEnd(aPath, aWriteWasSuccessful); - } - } -} - -chip::Optional LookupClusterByName(const char * name) -{ - for (const auto & cluster : clusters::kKnownClusters) - { - if (!strcmp(name, cluster.name)) - { - return chip::Optional(cluster.id); - } - } - return chip::Optional(); -} - -std::unique_ptr CreateCluster(chip::ClusterId id) -{ - for (const auto & cluster : clusters::kKnownClusters) - { - if (id == cluster.id) - { - return std::unique_ptr(cluster.ctor(::operator new(cluster.size))); - } - } - return nullptr; -} - -std::unique_ptr CreateCluster(const char * name) -{ - auto id = LookupClusterByName(name); - return id.HasValue() ? CreateCluster(id.Value()) : nullptr; -} - -CHIP_ERROR TLVWriteValue(chip::TLV::TLVWriter & wr, const Span & v) -{ - return wr.PutString(chip::TLV::AnonymousTag(), v); -} - -CHIP_ERROR TLVWriteValue(chip::TLV::TLVWriter & wr, const bool & v) -{ - return wr.PutBoolean(chip::TLV::AnonymousTag(), v); -} - -template -CHIP_ERROR TLVWriteValue(chip::TLV::TLVWriter & wr, const T & v) -{ - return wr.Put(chip::TLV::AnonymousTag(), v); -} - -CHIP_ERROR WriteValueToBuffer(const bool & value, chip::Span buffer) -{ - if (buffer.size() != 1) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - *(buffer.data()) = value ? 1 : 0; - return CHIP_NO_ERROR; -} - -template -CHIP_ERROR WriteValueToBuffer(const T & value, chip::Span buffer) -{ - size_t value_size = sizeof(value); - if (buffer.size() != value_size) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - memcpy(buffer.data(), &value, value_size); - return CHIP_NO_ERROR; -} - -template -CHIP_ERROR WriteValueToBuffer(chip::TLV::TLVReader & reader, chip::Span buffer) -{ - T v; - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, v)); - return WriteValueToBuffer(v, buffer); -} - -// Describes a conversion direction between: -// - A binary buffer (passed from ember internals) -// - A TLV data buffer (used by TLVWriter and TLVReader) -enum ConversionDirection -{ - BUFFER_TO_TLV, - TLV_TO_BUFFER -}; - -template -CHIP_ERROR PerformTLVBufferConversion(std::vector * tlvData, chip::Span buffer, - ConversionDirection convert_direction) -{ - CHIP_ERROR err; - if (convert_direction == BUFFER_TO_TLV) - { - // buffer.size() is ignored here, because it was called from the external write ember callback, - // which does not provide a buffer size - chip::TLV::TLVWriter wr; - wr.Init(tlvData->data(), tlvData->size()); - T value; - memcpy(&value, buffer.data(), sizeof(T)); - err = TLVWriteValue(wr, value); - wr.Finalize(); - tlvData->resize(wr.GetLengthWritten()); - } - else - { - chip::TLV::TLVReader rd; - rd.Init(tlvData->data(), tlvData->size()); - rd.Next(); - err = WriteValueToBuffer(rd, buffer); - } - return err; -} - -CHIP_ERROR PerformTLVBufferConversionForType(std::vector * tlvData, chip::Span buffer, EmberAfAttributeType type, - ConversionDirection convert_direction) -{ - switch (type) - { - case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: - case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion>(tlvData, buffer, convert_direction); - case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: - case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_STRUCT_ATTRIBUTE_TYPE: - // structs not supported yet - return CHIP_ERROR_NOT_IMPLEMENTED; - case ZCL_SINGLE_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_DOUBLE_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_INT8S_ATTRIBUTE_TYPE: - case ZCL_INT16S_ATTRIBUTE_TYPE: - case ZCL_INT24S_ATTRIBUTE_TYPE: - case ZCL_INT32S_ATTRIBUTE_TYPE: - case ZCL_INT40S_ATTRIBUTE_TYPE: - case ZCL_INT48S_ATTRIBUTE_TYPE: - case ZCL_INT56S_ATTRIBUTE_TYPE: - case ZCL_INT64S_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_INT8U_ATTRIBUTE_TYPE: - case ZCL_INT16U_ATTRIBUTE_TYPE: - case ZCL_INT24U_ATTRIBUTE_TYPE: - case ZCL_INT32U_ATTRIBUTE_TYPE: - case ZCL_INT40U_ATTRIBUTE_TYPE: - case ZCL_INT48U_ATTRIBUTE_TYPE: - case ZCL_INT56U_ATTRIBUTE_TYPE: - case ZCL_INT64U_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_BOOLEAN_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_BITMAP32_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - default: - // Assume integer - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - } -} - -bool emberAfActionsClusterInstantActionCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, - const Actions::Commands::InstantAction::DecodableType & commandData) -{ - // No actions are implemented, just return status NotFound. - commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::NotFound); - return true; -} - -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength) -{ - uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); - - if ((endpointIndex >= CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) || (gDevices[endpointIndex] == nullptr)) - { - ChipLogError(DeviceLayer, "Could not find dynamic endpoint: %d", endpoint); - return EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT; - } - - chip::app::AttributeAccessInterface * accessInterface = chip::app::GetAttributeAccessOverride(endpoint, clusterId); - - if (accessInterface == nullptr) - { - ChipLogError(DeviceLayer, "Cluster %d has no attribute access override", clusterId); - return EMBER_ZCL_STATUS_FAILURE; - } - - // adding 64 bytes as padding to include the staging buffer used by - // TLVReader and TLVWriter, which is 17 bytes - std::vector tlvData(attributeMetadata->size + 64); - - // read the attribute and write it to `data` - chip::TLV::TLVWriter writer; - writer.Init(tlvData.data(), tlvData.size()); - - // this cast is safe because all the registered attribute accessors are of type `CommonAttributeAccessInterface`. See `main()` - CHIP_ERROR err = static_cast(accessInterface) - ->Read(chip::app::ConcreteDataAttributePath(endpoint, clusterId, attributeMetadata->attributeId), writer); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "%" CHIP_ERROR_FORMAT, err.Format()); - ChipLogError(DeviceLayer, "Attribute access interface failed to read attribute %d, for endpoint %d cluster %d", - attributeMetadata->attributeId, endpoint, clusterId); - return EMBER_ZCL_STATUS_FAILURE; - } - writer.Finalize(); - tlvData.resize(writer.GetLengthWritten()); - - // read from `data` and write to `buffer` - - // maxReadLength here is the maximum number of bytes to read from the attribute value and to write into the buffer. - err = PerformTLVBufferConversionForType(&tlvData, chip::Span(buffer, maxReadLength), attributeMetadata->attributeType, - TLV_TO_BUFFER); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "%" CHIP_ERROR_FORMAT, err.Format()); - ChipLogError(DeviceLayer, "Failed to write attribute to buffer. Endpoint %d, Cluster %d, Attribute %d", endpoint, clusterId, - attributeMetadata->attributeId); - return EMBER_ZCL_STATUS_FAILURE; - } - - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) -{ - uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); - - if ((endpointIndex >= CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) || (gDevices[endpointIndex] == nullptr)) - { - ChipLogError(DeviceLayer, "Could not find dynamic endpoint: %d", endpoint); - return EMBER_ZCL_STATUS_FAILURE; - } - - chip::app::AttributeAccessInterface * accessInterface = chip::app::GetAttributeAccessOverride(endpoint, clusterId); - - if (accessInterface == nullptr) - { - ChipLogError(DeviceLayer, "Cluster %d has no attribute access override", clusterId); - return EMBER_ZCL_STATUS_FAILURE; - } - - // adding 64 bytes as padding to include the staging buffer used by - // TLVReader and TLVWriter, which is 17 bytes - std::vector tlvData(attributeMetadata->size + 64); - - // read from `buffer` and write to `data` - - // buffer size will not be used in this code path, so we set it to 0. See `PerformTLVBufferConversion` - CHIP_ERROR err = PerformTLVBufferConversionForType(&tlvData, chip::Span(buffer, 0), attributeMetadata->attributeType, - BUFFER_TO_TLV); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "%" CHIP_ERROR_FORMAT, err.Format()); - ChipLogError(DeviceLayer, "Failed to read value from buffer: Endpoint %d, Cluster %d, Attribute %d", endpoint, clusterId, - attributeMetadata->attributeId); - return EMBER_ZCL_STATUS_FAILURE; - } - - // read from `data` and write to attribute - chip::TLV::TLVReader reader; - reader.Init(tlvData.data(), tlvData.size()); - reader.Next(); - chip::app::AttributeValueDecoder decoder(reader, chip::Access::SubjectDescriptor()); - err = - accessInterface->Write(chip::app::ConcreteReadAttributePath(endpoint, clusterId, attributeMetadata->attributeId), decoder); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "%" CHIP_ERROR_FORMAT, err.Format()); - ChipLogError(DeviceLayer, - "Attribute access interface failed to write attribute value. Endpoint %d, Cluster %d, Attribute %d", endpoint, - clusterId, attributeMetadata->attributeId); - return EMBER_ZCL_STATUS_FAILURE; - } - - return EMBER_ZCL_STATUS_SUCCESS; -} - -Device * FindDeviceEndpoint(chip::EndpointId id) -{ - for (auto dev : gDevices) - { - if (dev && dev->GetEndpointId() == id) - { - return dev; - } - } - return nullptr; -} - -int AddDeviceEndpoint(Device * dev) -{ - uint8_t index = 0; - while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) - { - if (nullptr == gDevices[index]) - { - gDevices[index] = dev; - EmberAfStatus ret; - while (true) - { - // Todo: Update this to schedule the work rather than use this lock - dev->SetEndpointId(gCurrentEndpointId); - ret = - emberAfSetDynamicEndpoint(index, gCurrentEndpointId, dev->endpointType(), dev->versions(), dev->deviceTypes()); - if (ret == EMBER_ZCL_STATUS_SUCCESS) - { - ChipLogProgress(DeviceLayer, "Added device %s to dynamic endpoint %d (index=%d)", dev->GetName(), - gCurrentEndpointId, index); - return index; - } - if (ret != EMBER_ZCL_STATUS_DUPLICATE_EXISTS) - { - ChipLogProgress(DeviceLayer, "Failed to add dynamic endpoint: %d!", ret); - gDevices[index] = nullptr; - return -1; - } - // Handle wrap condition - if (++gCurrentEndpointId < gFirstDynamicEndpointId) - { - gCurrentEndpointId = gFirstDynamicEndpointId; - } - } - } - index++; - } - ChipLogProgress(DeviceLayer, "Failed to add dynamic endpoint: No endpoints available!"); - return -1; -} - -int RemoveDeviceEndpoint(Device * dev) -{ - uint8_t index = 0; - while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) - { - if (gDevices[index] == dev) - { - // Todo: Update this to schedule the work rather than use this lock - DeviceLayer::StackLock lock; - EndpointId ep = emberAfClearDynamicEndpoint(index); - gDevices[index] = nullptr; - ChipLogProgress(DeviceLayer, "Removed device %s from dynamic endpoint %d (index=%d)", dev->GetName(), ep, index); - // Silence complaints about unused ep when progress logging - // disabled. - UNUSED_VAR(ep); - return index; - } - index++; - } - return -1; -} - -Room * FindRoom(const std::string & name) -{ - for (auto & room : gRooms) - { - if (room.GetName() == name) - { - return &room; - } - } - return nullptr; -} - -chip::Span GetActionListInfo(chip::EndpointId parentId) -{ - return chip::Span(); -} - -void ApplicationInit() -{ -#ifdef PW_RPC_ENABLED - chip::rpc::Init(); - - pw::rpc::system_server::Server().RegisterService(bridge_service); -#endif - - gFirstDynamicEndpointId = static_cast( - static_cast(emberAfEndpointFromIndex(static_cast(emberAfFixedEndpointCount() - 1))) + 1); - gCurrentEndpointId = gFirstDynamicEndpointId; - StartUserInput(); -} - -int main(int argc, char * argv[]) -{ - VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); - - std::vector clusterAccess; - clusterAccess.reserve(std::extent::value); - for (auto & entry : clusters::kKnownClusters) - { - // Desciptor clusters should not be overridden. - if (entry.id != chip::app::Clusters::Descriptor::Id) - { - clusterAccess.emplace_back(chip::Optional(), entry.id); - registerAttributeAccessOverride(&clusterAccess.back()); - } - } - - ChipLinuxAppMainLoop(); - return 0; -} diff --git a/examples/dynamic-bridge-app/linux/third_party/connectedhomeip b/examples/dynamic-bridge-app/linux/third_party/connectedhomeip deleted file mode 120000 index 11a54ed360106c..00000000000000 --- a/examples/dynamic-bridge-app/linux/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../../ \ No newline at end of file diff --git a/examples/dynamic-bridge-app/linux/with_pw_rpc.gni b/examples/dynamic-bridge-app/linux/with_pw_rpc.gni deleted file mode 100644 index 6d90e3da2c7ac7..00000000000000 --- a/examples/dynamic-bridge-app/linux/with_pw_rpc.gni +++ /dev/null @@ -1,45 +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. - -# add this gni as import in your build args to use pigweed in the example -# 'import("//with_pw_rpc.gni")' - -import("//build_overrides/chip.gni") - -import("${chip_root}/config/standalone/args.gni") - -import("//build_overrides/pigweed.gni") - -cpp_standard = "gnu++17" - -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" -pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" -pw_trace_BACKEND = "$dir_pw_trace_tokenized" -pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" -pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc" -dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo" -pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock" -pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend" -pw_thread_YIELD_BACKEND = "$dir_pw_thread_stl:yield" -pw_thread_SLEEP_BACKEND = "$dir_pw_thread_stl:sleep" - -pw_build_LINK_DEPS = [ - "$dir_pw_assert:impl", - "$dir_pw_log:impl", -] - -chip_enable_pw_rpc = true -chip_build_pw_trace_lib = true -chip_use_pw_logging = true diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 2d9d75be284751..eef00caa037cc2 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1736,10 +1748,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1751,7 +1759,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 00257249e17edc..109cb28b638583 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -344,7 +344,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -500,7 +500,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5870,7 +5870,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6074,7 +6074,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8526,7 +8526,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8762,7 +8762,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/light-switch-app/nrfconnect/CMakeLists.txt b/examples/light-switch-app/nrfconnect/CMakeLists.txt index 7512e45ce45211..2e719072f23fb4 100644 --- a/examples/light-switch-app/nrfconnect/CMakeLists.txt +++ b/examples/light-switch-app/nrfconnect/CMakeLists.txt @@ -62,11 +62,11 @@ target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) -if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_SMP_BT) +if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/OTAUtil.cpp) endif() -if(CONFIG_MCUMGR_SMP_BT) +if(CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/DFUOverSMP.cpp) endif() diff --git a/examples/light-switch-app/nrfconnect/main/AppTask.cpp b/examples/light-switch-app/nrfconnect/main/AppTask.cpp index 9bc8422328d88a..405664af872c24 100644 --- a/examples/light-switch-app/nrfconnect/main/AppTask.cpp +++ b/examples/light-switch-app/nrfconnect/main/AppTask.cpp @@ -188,7 +188,7 @@ CHIP_ERROR AppTask::Init() k_timer_user_data_set(&sFunctionTimer, this); // Initialize DFU -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT GetDFUOverSMP().Init(); GetDFUOverSMP().ConfirmNewImage(); #endif @@ -300,7 +300,7 @@ void AppTask::ButtonReleaseHandler(const AppEvent & event) Instance().CancelTimer(Timer::Function); Instance().mFunction = FunctionEvent::NoneSelected; -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT GetDFUOverSMP().StartServer(); UpdateStatusLED(); #else diff --git a/examples/light-switch-app/nrfconnect/main/include/AppTask.h b/examples/light-switch-app/nrfconnect/main/include/AppTask.h index a40c5e82bfd51f..240ac589040164 100644 --- a/examples/light-switch-app/nrfconnect/main/include/AppTask.h +++ b/examples/light-switch-app/nrfconnect/main/include/AppTask.h @@ -29,7 +29,7 @@ #include #endif -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT #include "DFUOverSMP.h" #endif diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index 66c6f0ed1c6db3..d96ec9472c60cc 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1481,10 +1493,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1496,7 +1504,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index c8bc18787d3d9b..9cfe2296c4c6e0 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1391,10 +1403,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1406,7 +1414,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/lighting-app/esp32/CMakeLists.txt b/examples/lighting-app/esp32/CMakeLists.txt index e9a5418e8dda46..b37c8154a45208 100644 --- a/examples/lighting-app/esp32/CMakeLists.txt +++ b/examples/lighting-app/esp32/CMakeLists.txt @@ -37,6 +37,12 @@ endif() project(chip-lighting-app) +# WARNING: This is just an example for using key for decrypting the encrypted OTA image +# Please do not use it as is. +if(CONFIG_ENABLE_ENCRYPTED_OTA) + target_add_binary_data(chip-lighting-app.elf "esp_image_encryption_key.pem" TEXT) +endif() + # C++17 is required for RPC build. idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index d92513f33fbdf7..a3fe6fcd055e61 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1740,10 +1752,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1755,7 +1763,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only @@ -2410,7 +2418,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; } server cluster OnOff { diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 4e329bf3f9a696..e295ad4dc032ad 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -360,7 +360,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -516,7 +516,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5829,7 +5829,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6113,7 +6113,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/lighting-common/src/ColorFormat.cpp b/examples/lighting-app/lighting-common/src/ColorFormat.cpp index d45d8cdc693291..d30aacd841cc10 100644 --- a/examples/lighting-app/lighting-common/src/ColorFormat.cpp +++ b/examples/lighting-app/lighting-common/src/ColorFormat.cpp @@ -27,44 +27,46 @@ RgbColor_t HsvToRgb(HsvColor_t hsv) { RgbColor_t rgb; - uint16_t i = hsv.h / 60; - uint16_t rgb_max = hsv.v; - uint16_t rgb_min = (uint16_t)(rgb_max * (100 - hsv.s)) / 100; - uint16_t diff = hsv.h % 60; - uint16_t rgb_adj = (uint16_t)((rgb_max - rgb_min) * diff) / 60; + uint8_t region, p, q, t; + uint32_t h, s, v, remainder; - switch (i) + if (hsv.s == 0) { - case 0: - rgb.r = (uint8_t) rgb_max; - rgb.g = (uint8_t)(rgb_min + rgb_adj); - rgb.b = (uint8_t) rgb_min; - break; - case 1: - rgb.r = (uint8_t)(rgb_max - rgb_adj); - rgb.g = (uint8_t) rgb_max; - rgb.b = (uint8_t) rgb_min; - break; - case 2: - rgb.r = (uint8_t) rgb_min; - rgb.g = (uint8_t) rgb_max; - rgb.b = (uint8_t)(rgb_min + rgb_adj); - break; - case 3: - rgb.r = (uint8_t) rgb_min; - rgb.g = (uint8_t)(rgb_max - rgb_adj); - rgb.b = (uint8_t) rgb_max; - break; - case 4: - rgb.r = (uint8_t)(rgb_min + rgb_adj); - rgb.g = (uint8_t) rgb_min; - rgb.b = (uint8_t) rgb_max; - break; - default: - rgb.r = (uint8_t) rgb_max; - rgb.g = (uint8_t) rgb_min; - rgb.b = (uint8_t)(rgb_max - rgb_adj); - break; + rgb.r = rgb.g = rgb.b = hsv.v; + } + else + { + h = hsv.h; + s = hsv.s; + v = hsv.v; + + region = h / 43; + remainder = (h - (region * 43)) * 6; + p = (v * (255 - s)) >> 8; + q = (v * (255 - ((s * remainder) >> 8))) >> 8; + t = (v * (255 - ((s * (255 - remainder)) >> 8))) >> 8; + switch (region) + { + case 0: + rgb.r = v, rgb.g = t, rgb.b = p; + break; + case 1: + rgb.r = q, rgb.g = v, rgb.b = p; + break; + case 2: + rgb.r = p, rgb.g = v, rgb.b = t; + break; + case 3: + rgb.r = p, rgb.g = q, rgb.b = v; + break; + case 4: + rgb.r = t, rgb.g = p, rgb.b = v; + break; + case 5: + default: + rgb.r = v, rgb.g = p, rgb.b = q; + break; + } } return rgb; diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index 94996c75ab7255..bf378bc4468339 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -67,11 +67,11 @@ chip_configure_data_model(app ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lighting-common/lighting-app.zap ) -if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_SMP_BT) +if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/OTAUtil.cpp) endif() -if(CONFIG_MCUMGR_SMP_BT) +if(CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/DFUOverSMP.cpp) endif() diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index 5ff0c6a59ea3ca..e16230e000ca0f 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -197,7 +197,7 @@ CHIP_ERROR AppTask::Init() k_timer_init(&sFunctionTimer, &AppTask::FunctionTimerTimeoutCallback, nullptr); k_timer_user_data_set(&sFunctionTimer, this); -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT // Initialize DFU over SMP GetDFUOverSMP().Init(); GetDFUOverSMP().ConfirmNewImage(); @@ -474,7 +474,7 @@ void AppTask::FunctionHandler(const AppEvent & event) Instance().CancelTimer(); Instance().mFunction = FunctionEvent::NoneSelected; -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT GetDFUOverSMP().StartServer(); #else LOG_INF("Software update is disabled"); diff --git a/examples/lighting-app/nrfconnect/main/include/AppTask.h b/examples/lighting-app/nrfconnect/main/include/AppTask.h index 51df03f650c530..37be9a0334847c 100644 --- a/examples/lighting-app/nrfconnect/main/include/AppTask.h +++ b/examples/lighting-app/nrfconnect/main/include/AppTask.h @@ -34,7 +34,7 @@ #include "Rpc.h" #endif -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT #include "DFUOverSMP.h" #endif diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 5fadd12aa95524..52db5c7fafafb3 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1307,10 +1319,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1322,7 +1330,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } endpoint 0 { diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 7d1f79bdbb00c0..4ca38a58c4d353 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1372,10 +1384,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1387,7 +1395,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index e2b5cc34badfb1..35d143b87c10b5 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1596,10 +1608,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1611,7 +1619,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only @@ -2238,7 +2246,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; } server cluster OnOff { diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index c17df50d24b7a0..8324bed85fe737 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -360,7 +360,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -516,7 +516,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5936,7 +5936,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6244,7 +6244,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 0f32ee174a5492..f57a222dae038f 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1486,10 +1498,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1501,7 +1509,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only @@ -2016,7 +2024,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; } server cluster OnOff { diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index 595f08a22e0638..58bd1a3e5da705 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -360,7 +360,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -516,7 +516,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5682,7 +5682,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5966,7 +5966,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 18d8c5c3a1cfb4..f65707d1bf81a7 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1591,10 +1603,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1606,7 +1614,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index f29916c9b68c65..5ccddc2b088daf 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -344,7 +344,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -500,7 +500,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5768,7 +5768,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5924,7 +5924,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lock-app/nrfconnect/CMakeLists.txt b/examples/lock-app/nrfconnect/CMakeLists.txt index 4be8f9927b5c22..e1b3e8f2f0e489 100644 --- a/examples/lock-app/nrfconnect/CMakeLists.txt +++ b/examples/lock-app/nrfconnect/CMakeLists.txt @@ -64,11 +64,11 @@ chip_configure_data_model(app ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lock-common/lock-app.zap ) -if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_SMP_BT) +if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/OTAUtil.cpp) endif() -if(CONFIG_MCUMGR_SMP_BT) +if(CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/DFUOverSMP.cpp) endif() diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index 8acf7d6b56d325..aa65236ba747d2 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -179,7 +179,7 @@ CHIP_ERROR AppTask::Init() k_timer_init(&sFunctionTimer, &AppTask::FunctionTimerTimeoutCallback, nullptr); k_timer_user_data_set(&sFunctionTimer, this); -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT // Initialize DFU over SMP GetDFUOverSMP().Init(); GetDFUOverSMP().ConfirmNewImage(); @@ -433,7 +433,7 @@ void AppTask::FunctionHandler(const AppEvent & event) Instance().CancelTimer(); Instance().mFunction = FunctionEvent::NoneSelected; -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT GetDFUOverSMP().StartServer(); #else LOG_INF("Software update is disabled"); diff --git a/examples/lock-app/nrfconnect/main/include/AppTask.h b/examples/lock-app/nrfconnect/main/include/AppTask.h index 76738ac9afd331..01d1536bc2545e 100644 --- a/examples/lock-app/nrfconnect/main/include/AppTask.h +++ b/examples/lock-app/nrfconnect/main/include/AppTask.h @@ -31,7 +31,7 @@ #include #endif -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT #include "DFUOverSMP.h" #endif diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index dd28561f133574..1991075fd9bb86 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -926,10 +938,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -941,7 +949,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface to a generic way to secure a door */ diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index fa3d4a2500e107..2062ba0e7026a9 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1206,10 +1218,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1221,7 +1229,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 410eaa08d2c140..23798cde6f2219 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; diff --git a/examples/log-source-app/log-source-common/log-source-app.zap b/examples/log-source-app/log-source-common/log-source-app.zap index c8f1206c98d776..ba1151d632720e 100644 --- a/examples/log-source-app/log-source-common/log-source-app.zap +++ b/examples/log-source-app/log-source-common/log-source-app.zap @@ -344,7 +344,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -500,7 +500,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index df335e0d320d33..60ce28100ca0b7 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -907,10 +919,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -922,7 +930,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index 23c02066958fa5..3c5cb228625f20 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -344,7 +344,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -500,7 +500,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index f25d1a815d47e2..79eb0c8f93911d 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1089,10 +1101,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1104,7 +1112,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 88cbf17445fe15..867c71d558337e 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -344,7 +344,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -500,7 +500,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5593,7 +5593,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5853,7 +5853,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/pigweed-app/nrfconnect/prj.conf b/examples/pigweed-app/nrfconnect/prj.conf index bb86ae1babb8f8..fad377211225f9 100644 --- a/examples/pigweed-app/nrfconnect/prj.conf +++ b/examples/pigweed-app/nrfconnect/prj.conf @@ -20,9 +20,6 @@ CONFIG_CHIP=y # samples. This file should contain only options specific for this sample # or overrides of default values. -# Export POSIX names for functions implementing a subset of POSIX standard in Zephyr -CONFIG_POSIX_API=y - # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 8c93457f717351..43897ccc850a9f 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -2634,23 +2646,44 @@ server cluster BooleanState = 69 { /** Attributes and commands for selecting a mode from a list of supported options. */ client cluster ModeSelect = 80 { + enum ModeTag : ENUM16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + } + + enum StatusCode : ENUM8 { + kSuccess = 0; + kUnsupportedMode = 1; + kGenericFailure = 2; + } + bitmap Feature : BITMAP32 { - kDeponoff = 0x1; + kOnOff = 0x1; + kExtendedStatus = 0x2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; + struct ModeTagStruct { + optional vendor_id mfgCode = 0; enum16 value = 1; + optional char_string<64> tagName = 2; } struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; - SemanticTagStruct semanticTags[] = 2; + ModeTagStruct modeTags[] = 2; } - readonly attribute char_string<32> description = 0; - readonly attribute nullable enum16 standardNamespace = 1; + readonly attribute char_string<64> description = 0; + readonly attribute optional nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; readonly attribute int8u currentMode = 3; attribute optional nullable int8u startUpMode = 4; @@ -2666,28 +2699,63 @@ client cluster ModeSelect = 80 { INT8U newMode = 0; } - /** On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. */ + request struct ChangeToModeWithStatusRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 2 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + /** If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. */ command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; + /** This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToModeWithStatus(ChangeToModeWithStatusRequest): ChangeToModeResponse = 1; } /** Attributes and commands for selecting a mode from a list of supported options. */ server cluster ModeSelect = 80 { + enum ModeTag : ENUM16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + } + + enum StatusCode : ENUM8 { + kSuccess = 0; + kUnsupportedMode = 1; + kGenericFailure = 2; + } + bitmap Feature : BITMAP32 { - kDeponoff = 0x1; + kOnOff = 0x1; + kExtendedStatus = 0x2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; + struct ModeTagStruct { + optional vendor_id mfgCode = 0; enum16 value = 1; + optional char_string<64> tagName = 2; } struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; - SemanticTagStruct semanticTags[] = 2; + ModeTagStruct modeTags[] = 2; } - readonly attribute char_string<32> description = 0; + readonly attribute char_string<64> description = 0; readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; readonly attribute int8u currentMode = 3; @@ -7000,7 +7068,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; } server cluster OnOff { diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 17dfdafaffef2a..4ff350fe8ff315 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -11114,7 +11114,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11366,7 +11366,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index e16c1091235c08..a08f06fd56a176 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -2593,23 +2605,44 @@ server cluster BooleanState = 69 { /** Attributes and commands for selecting a mode from a list of supported options. */ client cluster ModeSelect = 80 { + enum ModeTag : ENUM16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + } + + enum StatusCode : ENUM8 { + kSuccess = 0; + kUnsupportedMode = 1; + kGenericFailure = 2; + } + bitmap Feature : BITMAP32 { - kDeponoff = 0x1; + kOnOff = 0x1; + kExtendedStatus = 0x2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; + struct ModeTagStruct { + optional vendor_id mfgCode = 0; enum16 value = 1; + optional char_string<64> tagName = 2; } struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; - SemanticTagStruct semanticTags[] = 2; + ModeTagStruct modeTags[] = 2; } - readonly attribute char_string<32> description = 0; - readonly attribute nullable enum16 standardNamespace = 1; + readonly attribute char_string<64> description = 0; + readonly attribute optional nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; readonly attribute int8u currentMode = 3; attribute optional nullable int8u startUpMode = 4; @@ -2625,28 +2658,63 @@ client cluster ModeSelect = 80 { INT8U newMode = 0; } - /** On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. */ + request struct ChangeToModeWithStatusRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 2 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + /** If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. */ command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; + /** This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToModeWithStatus(ChangeToModeWithStatusRequest): ChangeToModeResponse = 1; } /** Attributes and commands for selecting a mode from a list of supported options. */ server cluster ModeSelect = 80 { + enum ModeTag : ENUM16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + } + + enum StatusCode : ENUM8 { + kSuccess = 0; + kUnsupportedMode = 1; + kGenericFailure = 2; + } + bitmap Feature : BITMAP32 { - kDeponoff = 0x1; + kOnOff = 0x1; + kExtendedStatus = 0x2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; + struct ModeTagStruct { + optional vendor_id mfgCode = 0; enum16 value = 1; + optional char_string<64> tagName = 2; } struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; - SemanticTagStruct semanticTags[] = 2; + ModeTagStruct modeTags[] = 2; } - readonly attribute char_string<32> description = 0; + readonly attribute char_string<64> description = 0; readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; readonly attribute int8u currentMode = 3; @@ -6976,7 +7044,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; } server cluster OnOff { diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 09a3989fec531c..95b14378f1f477 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -11398,7 +11398,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11650,7 +11650,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/placeholder/linux/static-supported-modes-manager.cpp b/examples/placeholder/linux/static-supported-modes-manager.cpp index 17fa5d007b8493..a806a22c2757e2 100644 --- a/examples/placeholder/linux/static-supported-modes-manager.cpp +++ b/examples/placeholder/linux/static-supported-modes-manager.cpp @@ -8,31 +8,30 @@ using namespace chip::app::Clusters::ModeSelect; using chip::Protocols::InteractionModel::Status; using ModeOptionStructType = Structs::ModeOptionStruct::Type; -using SemanticTag = Structs::SemanticTagStruct::Type; +using ModeTagType = Structs::ModeTagStruct::Type; template using List = app::DataModel::List; using storage_value_type = const ModeOptionStructType; namespace { -Structs::ModeOptionStruct::Type buildModeOptionStruct(const char * label, uint8_t mode, - const List & semanticTags) +Structs::ModeOptionStruct::Type buildModeOptionStruct(const char * label, uint8_t mode, const List & modeTags) { Structs::ModeOptionStruct::Type option; - option.label = CharSpan::fromCharString(label); - option.mode = mode; - option.semanticTags = semanticTags; + option.label = CharSpan::fromCharString(label); + option.mode = mode; + option.modeTags = modeTags; return option; } } // namespace -constexpr SemanticTag semanticTagsBlack[] = { { .value = 0 } }; -constexpr SemanticTag semanticTagsCappucino[] = { { .value = 0 } }; -constexpr SemanticTag semanticTagsEspresso[] = { { .value = 0 } }; +ModeTagType modeTagsBlack[] = { detail::Structs::ModeTagStruct::Type{ .value = 0 } }; +ModeTagType modeTagsCappucino[] = { detail::Structs::ModeTagStruct::Type{ .value = 0 } }; +ModeTagType modeTagsEspresso[] = { detail::Structs::ModeTagStruct::Type{ .value = 0 } }; // TODO: Configure your options for each endpoint storage_value_type StaticSupportedModesManager::coffeeOptions[] = { - buildModeOptionStruct("Black", 0, List(semanticTagsBlack)), - buildModeOptionStruct("Cappuccino", 4, List(semanticTagsCappucino)), - buildModeOptionStruct("Espresso", 7, List(semanticTagsEspresso)) + buildModeOptionStruct("Black", 0, List(modeTagsBlack)), + buildModeOptionStruct("Cappuccino", 4, List(modeTagsCappucino)), + buildModeOptionStruct("Espresso", 7, List(modeTagsEspresso)) }; const StaticSupportedModesManager::EndpointSpanPair StaticSupportedModesManager::supportedOptionsByEndpoints[EMBER_AF_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT] = { diff --git a/examples/platform/esp32/mode-support/static-supported-modes-manager.cpp b/examples/platform/esp32/mode-support/static-supported-modes-manager.cpp index 769d5cbd43be53..c5b744b3616dde 100644 --- a/examples/platform/esp32/mode-support/static-supported-modes-manager.cpp +++ b/examples/platform/esp32/mode-support/static-supported-modes-manager.cpp @@ -26,7 +26,8 @@ using namespace chip::app::Clusters::ModeSelect; using chip::Protocols::InteractionModel::Status; using ModeOptionStructType = Structs::ModeOptionStruct::Type; -using SemanticTag = Structs::SemanticTagStruct::Type; +using ModeTagType = Structs::ModeTagStruct::Type; + template using List = app::DataModel::List; @@ -50,7 +51,7 @@ SupportedModesManager::ModeOptionsProvider StaticSupportedModesManager::getModeO } ModeOptionStructType * modeOptionStructList = nullptr; - SemanticTag * semanticTags = nullptr; + ModeTagType * modeTags = nullptr; char keyBuf[ESP32Config::kMaxConfigKeyNameLength]; uint32_t supportedModeCount = 0; @@ -73,7 +74,7 @@ SupportedModesManager::ModeOptionsProvider StaticSupportedModesManager::getModeO { Structs::ModeOptionStruct::Type option; uint32_t supportedModeMode = 0; - uint32_t semanticTagCount = 0; + uint32_t modeTagCount = 0; size_t outLen = 0; memset(keyBuf, 0, sizeof(char) * ESP32Config::kMaxConfigKeyNameLength); @@ -103,50 +104,49 @@ SupportedModesManager::ModeOptionsProvider StaticSupportedModesManager::getModeO ModeOptionsProvider(nullptr, nullptr), CleanUp(endpointId)); memset(keyBuf, 0, sizeof(char) * ESP32Config::kMaxConfigKeyNameLength); - VerifyOrReturnValue(ESP32Config::KeyAllocator::SemanticTagsCount(keyBuf, sizeof(keyBuf), endpointId, index) == - CHIP_NO_ERROR, + VerifyOrReturnValue(ESP32Config::KeyAllocator::ModeTagsCount(keyBuf, sizeof(keyBuf), endpointId, index) == CHIP_NO_ERROR, ModeOptionsProvider(nullptr, nullptr), CleanUp(endpointId)); ESP32Config::Key stCountKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf); - VerifyOrReturnValue(ESP32Config::ReadConfigValue(stCountKey, semanticTagCount) == CHIP_NO_ERROR, + VerifyOrReturnValue(ESP32Config::ReadConfigValue(stCountKey, modeTagCount) == CHIP_NO_ERROR, ModeOptionsProvider(nullptr, nullptr), CleanUp(endpointId)); - semanticTags = new SemanticTag[semanticTagCount]; - if (semanticTags == nullptr) + modeTags = new ModeTagType[modeTagCount]; + if (modeTags == nullptr) { CleanUp(endpointId); return ModeOptionsProvider(nullptr, nullptr); } - for (auto stIndex = 0; stIndex < semanticTagCount; stIndex++) + for (auto stIndex = 0; stIndex < modeTagCount; stIndex++) { - uint32_t semanticTagValue = 0; - uint32_t semanticTagMfgCode = 0; - SemanticTag tag; + uint32_t modeTagValue = 0; + uint32_t modeTagMfgCode = 0; + ModeTagType tag; memset(keyBuf, 0, sizeof(char) * ESP32Config::kMaxConfigKeyNameLength); - VerifyOrReturnValue(ESP32Config::KeyAllocator::SemanticTagValue(keyBuf, sizeof(keyBuf), endpointId, index, stIndex) == + VerifyOrReturnValue(ESP32Config::KeyAllocator::ModeTagValue(keyBuf, sizeof(keyBuf), endpointId, index, stIndex) == CHIP_NO_ERROR, ModeOptionsProvider(nullptr, nullptr), CleanUp(endpointId)); ESP32Config::Key stValueKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf); - VerifyOrReturnValue(ESP32Config::ReadConfigValue(stValueKey, semanticTagValue) == CHIP_NO_ERROR, + VerifyOrReturnValue(ESP32Config::ReadConfigValue(stValueKey, modeTagValue) == CHIP_NO_ERROR, ModeOptionsProvider(nullptr, nullptr), CleanUp(endpointId)); memset(keyBuf, 0, sizeof(char) * ESP32Config::kMaxConfigKeyNameLength); - VerifyOrReturnValue(ESP32Config::KeyAllocator::SemanticTagMfgCode(keyBuf, sizeof(keyBuf), endpointId, index, stIndex) == + VerifyOrReturnValue(ESP32Config::KeyAllocator::ModeTagMfgCode(keyBuf, sizeof(keyBuf), endpointId, index, stIndex) == CHIP_NO_ERROR, ModeOptionsProvider(nullptr, nullptr), CleanUp(endpointId)); ESP32Config::Key stMfgCodeKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf); - VerifyOrReturnValue(ESP32Config::ReadConfigValue(stMfgCodeKey, semanticTagMfgCode) == CHIP_NO_ERROR, + VerifyOrReturnValue(ESP32Config::ReadConfigValue(stMfgCodeKey, modeTagMfgCode) == CHIP_NO_ERROR, ModeOptionsProvider(nullptr, nullptr), CleanUp(endpointId)); - tag.value = static_cast(semanticTagValue); - tag.mfgCode = static_cast(semanticTagMfgCode); - semanticTags[stIndex] = tag; + tag.value = static_cast(modeTagValue); + // tag.mfgCode = static_cast(modeTagMfgCode); + modeTags[stIndex] = tag; } - option.label = chip::CharSpan::fromCharString(modeLabel); - option.mode = static_cast(supportedModeMode); - option.semanticTags = DataModel::List(semanticTags, semanticTagCount); + option.label = chip::CharSpan::fromCharString(modeLabel); + option.mode = static_cast(supportedModeMode); + option.modeTags = DataModel::List(modeTags, modeTagCount); modeOptionStructList[index] = option; } @@ -193,7 +193,7 @@ void StaticSupportedModesManager::FreeSupportedModes(EndpointId endpointId) cons { auto & modeOption = *it; delete[] modeOption.label.data(); - delete[] modeOption.semanticTags.data(); + delete[] modeOption.modeTags.data(); } delete[] begin; } diff --git a/examples/platform/esp32/mode-support/static-supported-modes-manager.h b/examples/platform/esp32/mode-support/static-supported-modes-manager.h index 689c9d059f4ab7..9506f158e5d52a 100644 --- a/examples/platform/esp32/mode-support/static-supported-modes-manager.h +++ b/examples/platform/esp32/mode-support/static-supported-modes-manager.h @@ -30,7 +30,7 @@ class StaticSupportedModesManager : public chip::app::Clusters::ModeSelect::Supp { private: using ModeOptionStructType = Structs::ModeOptionStruct::Type; - using SemanticTag = Structs::SemanticTagStruct::Type; + using ModeTag = Structs::ModeTagStruct::Type; static ModeOptionsProvider epModeOptionsProviderList[FIXED_ENDPOINT_COUNT]; diff --git a/examples/platform/esp32/ota/OTAHelper.cpp b/examples/platform/esp32/ota/OTAHelper.cpp index cd4cfe90dea17d..0b254f5d13e86e 100644 --- a/examples/platform/esp32/ota/OTAHelper.cpp +++ b/examples/platform/esp32/ota/OTAHelper.cpp @@ -49,6 +49,15 @@ chip::Optional gRequestorCanConsent; static chip::ota::UserConsentState gUserConsentState = chip::ota::UserConsentState::kUnknown; chip::ota::DefaultOTARequestorUserConsent gUserConsentProvider; +// WARNING: This is just an example for using key for decrypting the encrypted OTA image +// Please do not use it as is for production use cases +#if CONFIG_ENABLE_ENCRYPTED_OTA +extern const char sOTADecryptionKeyStart[] asm("_binary_esp_image_encryption_key_pem_start"); +extern const char sOTADecryptionKeyEnd[] asm("_binary_esp_image_encryption_key_pem_end"); + +CharSpan sOTADecryptionKey(sOTADecryptionKeyStart, sOTADecryptionKeyEnd - sOTADecryptionKeyStart); +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + } // namespace bool CustomOTARequestorDriver::CanConsent() @@ -67,6 +76,10 @@ void OTAHelpers::InitOTARequestor() gDownloader.SetImageProcessorDelegate(&gImageProcessor); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); +#if CONFIG_ENABLE_ENCRYPTED_OTA + gImageProcessor.InitEncryptedOTA(sOTADecryptionKey); +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + if (gUserConsentState != chip::ota::UserConsentState::kUnknown) { gUserConsentProvider.SetUserConsentState(gUserConsentState); diff --git a/examples/platform/nrfconnect/util/DFUOverSMP.cpp b/examples/platform/nrfconnect/util/DFUOverSMP.cpp index 1720a58edb5c73..ac59171598127f 100644 --- a/examples/platform/nrfconnect/util/DFUOverSMP.cpp +++ b/examples/platform/nrfconnect/util/DFUOverSMP.cpp @@ -17,7 +17,7 @@ #include "DFUOverSMP.h" -#if !defined(CONFIG_MCUMGR_SMP_BT) || !defined(CONFIG_MCUMGR_CMD_IMG_MGMT) || !defined(CONFIG_MCUMGR_CMD_OS_MGMT) +#if !defined(CONFIG_MCUMGR_TRANSPORT_BT) || !defined(CONFIG_MCUMGR_GRP_IMG) || !defined(CONFIG_MCUMGR_GRP_OS) #error "DFUOverSMP requires MCUMGR module configs enabled" #endif diff --git a/examples/pump-app/nrfconnect/CMakeLists.txt b/examples/pump-app/nrfconnect/CMakeLists.txt index 59ac3654a27d29..94ae9180fb6392 100644 --- a/examples/pump-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-app/nrfconnect/CMakeLists.txt @@ -63,10 +63,10 @@ chip_configure_data_model(app ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../pump-common/pump-app.zap ) -if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_SMP_BT) +if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/OTAUtil.cpp) endif() -if(CONFIG_MCUMGR_SMP_BT) +if(CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/DFUOverSMP.cpp) endif() diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index 1a45d22444af03..9c75c54e1fcc87 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -154,7 +154,7 @@ CHIP_ERROR AppTask::Init() k_timer_init(&sFunctionTimer, &AppTask::FunctionTimerTimeoutCallback, nullptr); k_timer_user_data_set(&sFunctionTimer, this); -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT // Initialize DFU over SMP GetDFUOverSMP().Init(); GetDFUOverSMP().ConfirmNewImage(); @@ -342,7 +342,7 @@ void AppTask::FunctionHandler(const AppEvent & event) { Instance().CancelTimer(); -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT GetDFUOverSMP().StartServer(); #else LOG_INF("Software update is disabled"); diff --git a/examples/pump-app/nrfconnect/main/include/AppTask.h b/examples/pump-app/nrfconnect/main/include/AppTask.h index bcf2d1eaf20dad..fb2fe2c855cb1a 100644 --- a/examples/pump-app/nrfconnect/main/include/AppTask.h +++ b/examples/pump-app/nrfconnect/main/include/AppTask.h @@ -31,7 +31,7 @@ #include #endif -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT #include "DFUOverSMP.h" #endif diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 4ce98fbb11bfa8..06e12a5b21d32d 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1165,10 +1177,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1180,7 +1188,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface for configuring and controlling pumps. */ diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index ec914a1b9524ba..de01f2557f1551 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -726,7 +726,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/pump-controller-app/nrfconnect/CMakeLists.txt b/examples/pump-controller-app/nrfconnect/CMakeLists.txt index 3534eb8444a4fb..8a5b8f4193b245 100644 --- a/examples/pump-controller-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-controller-app/nrfconnect/CMakeLists.txt @@ -63,10 +63,10 @@ chip_configure_data_model(app ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../pump-controller-common/pump-controller-app.zap ) -if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_SMP_BT) +if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/OTAUtil.cpp) endif() -if(CONFIG_MCUMGR_SMP_BT) +if(CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/DFUOverSMP.cpp) endif() diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index 6a8954c121f0e1..9580af61ae451d 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -152,7 +152,7 @@ CHIP_ERROR AppTask::Init() k_timer_init(&sFunctionTimer, &AppTask::FunctionTimerTimeoutCallback, nullptr); k_timer_user_data_set(&sFunctionTimer, this); -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT // Initialize DFU over SMP GetDFUOverSMP().Init(); GetDFUOverSMP().ConfirmNewImage(); @@ -339,7 +339,7 @@ void AppTask::FunctionHandler(const AppEvent & event) { Instance().CancelTimer(); -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT GetDFUOverSMP().StartServer(); #else LOG_INF("Software update is disabled"); diff --git a/examples/pump-controller-app/nrfconnect/main/include/AppTask.h b/examples/pump-controller-app/nrfconnect/main/include/AppTask.h index 02e7f0a5320d12..8ca4a69e91c0f0 100644 --- a/examples/pump-controller-app/nrfconnect/main/include/AppTask.h +++ b/examples/pump-controller-app/nrfconnect/main/include/AppTask.h @@ -31,7 +31,7 @@ #include #endif -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT #include "DFUOverSMP.h" #endif diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 0fbcef5fa10230..15b6233cc69855 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1090,10 +1102,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1105,7 +1113,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface for configuring and controlling pumps. */ diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 63590afb94e694..4dd00338218210 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -448,7 +448,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -684,7 +684,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/dynamic-bridge-app/linux/.gn b/examples/smoke-co-alarm-app/silabs/.gn similarity index 83% rename from examples/dynamic-bridge-app/linux/.gn rename to examples/smoke-co-alarm-app/silabs/.gn index 70728706ea4a14..b05216fc9d7eae 100644 --- a/examples/dynamic-bridge-app/linux/.gn +++ b/examples/smoke-co-alarm-app/silabs/.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2020 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,5 +21,9 @@ buildconfig = "${build_root}/config/BUILDCONFIG.gn" check_system_includes = true default_args = { - import("//args.gni") + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") } diff --git a/examples/smoke-co-alarm-app/silabs/BUILD.gn b/examples/smoke-co-alarm-app/silabs/BUILD.gn new file mode 100644 index 00000000000000..c105d95546b958 --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/BUILD.gn @@ -0,0 +1,216 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/efr32_sdk.gni") +import("//build_overrides/pigweed.gni") + +import("${build_root}/config/defaults.gni") +import("${efr32_sdk_build_root}/silabs_executable.gni") + +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") +import("${chip_root}/src/platform/device.gni") +import("${chip_root}/third_party/silabs/silabs_board.gni") + +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +assert(current_os == "freertos") + +silabs_project_dir = "${chip_root}/examples/smoke-co-alarm-app/silabs" +examples_common_plat_dir = "${chip_root}/examples/platform/silabs" + +if (wifi_soc) { + import("${chip_root}/third_party/silabs/SiWx917_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" +} else { + import("${efr32_sdk_build_root}/efr32_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +} + +import("${examples_common_plat_dir}/args.gni") + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = false +} + +if (wifi_soc) { + siwx917_sdk("sdk") { + sources = [ + "${examples_plat_dir}/FreeRTOSConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/SiWx917", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + } +} else { + efr32_sdk("sdk") { + sources = [ + "${examples_plat_dir}/FreeRTOSConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/efr32", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + if (use_wf200) { + # TODO efr32_sdk should not need a header from this location + include_dirs += [ "${examples_plat_dir}/wf200" ] + } + + if (chip_enable_ble_rs911x) { + # TODO efr32_sdk should not need a header from this location + include_dirs += [ + "${examples_plat_dir}/rs911x", + "${examples_plat_dir}/rs911x/hal", + ] + } + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + } +} + +silabs_executable("smoke_co_alarm_app") { + output_name = "matter-silabs-smoke-co-alarm-example.out" + include_dirs = [ "include" ] + defines = [] + + sources = [ + "${examples_common_plat_dir}/main.cpp", + "src/AppTask.cpp", + "src/SmokeCoAlarmManager.cpp", + "src/ZclCallbacks.cpp", + ] + + if (chip_build_libshell) { + sources += [ "src/EventHandlerLibShell.cpp" ] + } + + deps = [ + ":sdk", + app_data_model, + ] + + if (wifi_soc) { + deps += [ "${examples_plat_dir}:siwx917-common" ] + } else { + deps += [ "${examples_plat_dir}:efr32-common" ] + } + + if (chip_enable_pw_rpc) { + defines += [ + "PW_RPC_ENABLED", + "PW_RPC_ATTRIBUTE_SERVICE=1", + "PW_RPC_BUTTON_SERVICE=1", + "PW_RPC_DESCRIPTOR_SERVICE=1", + "PW_RPC_DEVICE_SERVICE=1", + "PW_RPC_LIGHTING_SERVICE=1", + "PW_RPC_OTCLI_SERVICE=1", + "PW_RPC_THREAD_SERVICE=1", + ] + + sources += [ + "${chip_root}/examples/common/pigweed/RpcService.cpp", + "${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp", + "${examples_common_plat_dir}/PigweedLogger.cpp", + "${examples_common_plat_dir}/Rpc.cpp", + ] + + deps += [ + "$dir_pw_hdlc:rpc_channel_output", + "$dir_pw_stream:sys_io_stream", + "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", + "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:ot_cli_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:thread_service.nanopb_rpc", + ] + + if (wifi_soc) { + deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] + } else { + deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + } + + deps += pw_build_LINK_DEPS + + include_dirs += [ + "${chip_root}/examples/common", + "${chip_root}/examples/common/pigweed/efr32", + ] + } + + ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + + inputs = [ ldscript ] + + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + # WiFi Settings + if (chip_enable_wifi) { + ldflags += [ + "-Wl,--defsym", + "-Wl,SILABS_WIFI=1", + ] + } + + output_dir = root_out_dir +} + +group("silabs") { + deps = [ ":smoke_co_alarm_app" ] +} + +group("default") { + deps = [ ":silabs" ] +} diff --git a/examples/smoke-co-alarm-app/silabs/README.md b/examples/smoke-co-alarm-app/silabs/README.md new file mode 100644 index 00000000000000..88ec2711989229 --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/README.md @@ -0,0 +1,381 @@ +# Matter EFR32 Smoke CO Alarm Example + +An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. + +
+ +- [Matter EFR32 Smoke CO Alarm Example](#matter-efr32-smoke-co-alarm-example) + - [Introduction](#introduction) + - [Building](#building) + - [Flashing the Application](#flashing-the-application) + - [Viewing Logging Output](#viewing-logging-output) + - [Running the Complete Example](#running-the-complete-example) + - [Notes](#notes) + - [Memory settings](#memory-settings) + - [OTA Software Update](#ota-software-update) + - [Building options](#building-options) + - [Disabling logging](#disabling-logging) + - [Debug build / release build](#debug-build--release-build) + - [Disabling LCD](#disabling-lcd) + - [KVS maximum entry count](#kvs-maximum-entry-count) + +
+ +> **NOTE:** Silicon Laboratories now maintains a public matter GitHub repo with +> frequent releases thoroughly tested and validated. Developers looking to +> develop matter products with silabs hardware are encouraged to use our latest +> release with added tools and documentation. +> [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) + +## Introduction + +The EFR32 Smoke CO Alarm example provides a baseline demonstration of a Smoke CO +Alarm control device, built using Matter and the Silicon Labs gecko SDK. It can +be controlled by a Chip controller over an Openthread or Wifi network.. + +The EFR32 device can be commissioned over Bluetooth Low Energy where the device +and the Chip controller will exchange security information with the Rendez-vous +procedure. If using Thread, Thread Network credentials are then provided to the +EFR32 device which will then join the Thread network. + +If the LCD is enabled, the LCD on the Silabs WSTK shows a QR Code containing the +needed commissioning information for the BLE connection and starting the +Rendez-vous procedure. + +The Smoke CO Alarm example is intended to serve both as a means to explore the +workings of Matter as well as a template for creating real products based on the +Silicon Labs platform. + +## Building + +- Download the + [Simplicity Commander](https://www.silabs.com/mcu/programming-options) + command line tool, and ensure that `commander` is your shell search path. + (For Mac OS X, `commander` is located inside + `Commander.app/Contents/MacOS/`.) + +- Download and install a suitable ARM gcc tool chain: + [GNU Arm Embedded Toolchain 9-2019-q4-major](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads) + +- Install some additional tools(likely already present for CHIP developers): + + - Linux: `sudo apt-get install git ninja-build` + + - Mac OS X: `brew install ninja` + +- Supported hardware: + + - > For the latest supported hardware please refer to the + > [Hardware Requirements](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/general/HARDWARE_REQUIREMENTS.md) + > in the Silicon Labs Matter Github Repo + + MG12 boards: + + - BRD4161A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm + - BRD4162A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4163A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm, + 868MHz@19dBm + - BRD4164A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm + - BRD4166A / SLTB004A / Thunderboard Sense 2 / 2.4GHz@10dBm + - BRD4170A / SLWSTK6000B / Multiband Wireless Starter Kit / 2.4GHz@19dBm, + 915MHz@19dBm + - BRD4304A / SLWSTK6000B / MGM12P Module / 2.4GHz@19dBm + + MG21 boards: Currently not supported due to RAM limitation. + + - BRD4180A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + + MG24 boards : + + - BRD2601B / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD2703A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4186A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4186C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + - BRD4187C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + +* Build the example application: + + ``` + cd ~/connectedhomeip + ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app BRD4187C + ``` + +- To delete generated executable, libraries and object files use: + + ``` + $ cd ~/connectedhomeip + $ rm -rf ./out/ + ``` + + OR use GN/Ninja directly + + ``` + $ cd ~/connectedhomeip/examples/smoke-co-alarm-app/silabs + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export SILABS_BOARD=BRD4187C + $ gn gen out/debug + $ ninja -C out/debug + ``` + +- To delete generated executable, libraries and object files use: + + ``` + $ cd ~/connectedhomeip/examples/smoke-co-alarm-app/silabs + $ rm -rf out/ + ``` + +* Build the example as Sleepy End Device (SED) + + ``` + $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app_SED BRD4187C --sed + ``` + + or use gn as previously mentioned but adding the following arguments: + + ``` + $ gn gen out/debug '--args=SILABS_BOARD="BRD4187C" enable_sleepy_device=true chip_openthread_ftd=false' + ``` + +* Build the example with pigweed RPC + + ``` + $ ./scripts/examples/gn_silabs_example.sh examples/smoke-co-alarm-app/silabs out/smoke_co_alarm_app_rpc BRD4187C 'import("//with_pw_rpc.gni")' + ``` + + or use GN/Ninja Directly + + ``` + $ cd ~/connectedhomeip/examples/smoke-co-alarm-app/silabs + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export SILABS_BOARD=BRD4187C + $ gn gen out/debug --args='import("//with_pw_rpc.gni")' + $ ninja -C out/debug + ``` + +For more build options, help is provided when running the build script without +arguments + + ``` + ./scripts/examples/gn_silabs_example.sh + ``` + +## Flashing the Application + +- On the command line: + + ``` + $ cd ~/connectedhomeip/examples/smoke-co-alarm-app/silabs + $ python3 out/debug/matter-silabs-smoke-co-alarm-example.flash.py + ``` + +- Or with the Ozone debugger, just load the .out file. + +All EFR32 boards require a bootloader, see Silicon Labs documentation for more +info. Pre-built bootloader binaries are available in the Assets section of the +Releases page on +[Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) . + +## Viewing Logging Output + +The example application is built to use the SEGGER Real Time Transfer (RTT) +facility for log output. RTT is a feature built-in to the J-Link Interface MCU +on the WSTK development board. It allows bi-directional communication with an +embedded application without the need for a dedicated UART. + +Using the RTT facility requires downloading and installing the _SEGGER J-Link +Software and Documentation Pack_ +([web site](https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack)). + +Alternatively, SEGGER Ozone J-Link debugger can be used to view RTT logs too +after flashing the .out file. + +- Download the J-Link installer by navigating to the appropriate URL and + agreeing to the license agreement. + +- [JLink_Linux_x86_64.deb](https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb) +- [JLink_MacOSX.pkg](https://www.segger.com/downloads/jlink/JLink_MacOSX.pkg) + +* Install the J-Link software + + ``` + $ cd ~/Downloads + $ sudo dpkg -i JLink_Linux_V*_x86_64.deb + ``` + +* In Linux, grant the logged in user the ability to talk to the development + hardware via the linux tty device (/dev/ttyACMx) by adding them to the + dialout group. + + ``` + $ sudo usermod -a -G dialout ${USER} + ``` + +Once the above is complete, log output can be viewed using the JLinkExe tool in +combination with JLinkRTTClient as follows: + +- Run the JLinkExe tool with arguments to autoconnect to the WSTK board: + + For MG12 use: + + ``` + $ JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1 + ``` + + For MG21 use: + + ``` + $ JLinkExe -device EFR32MG21AXXXF1024 -if SWD -speed 4000 -autoconnect 1 + ``` + +- In a second terminal, run the JLinkRTTClient to view logs: + + ``` + $ JLinkRTTClient + ``` + +## Running the Complete Example + +- It is assumed here that you already have an OpenThread border router + configured and running. If not see the following guide + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + for more information on how to setup a border router on a raspberryPi. + + Take note that the RCP code is available directly through + [Simplicity Studio 5](https://www.silabs.com/products/development-tools/software/simplicity-studio/simplicity-studio-5) + under File->New->Project Wizard->Examples->Thread : ot-rcp + +- User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR + Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over + BLE + + * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, + a URL can be found in the RTT logs. + + [SVR] Copy/paste the below URL in a browser to see the QR Code: + [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 + + **LED 0** shows the overall state of the device and its connectivity. The + following states are possible: + + - _Short Flash On (50 ms on/950 ms off)_ ; The device is in the + unprovisioned (unpaired) state and is waiting for a commissioning + application to connect. + + - _Rapid Even Flashing_ ; (100 ms on/100 ms off)_ — The device is in the + unprovisioned state and a commissioning application is connected through + Bluetooth LE. + + - _Short Flash Off_ ; (950ms on/50ms off)_ — The device is fully + provisioned, but does not yet have full Thread network or service + connectivity. + + - _Solid On_ ; The device is fully provisioned and has full Thread + network and service connectivity. + + **Push Button 0** + + - _Press and Release_ : Start, or restart, BLE advertisement in fast mode. It will advertise in this mode + for 30 seconds. The device will then switch to a slower interval advertisement. + After 15 minutes, the advertisement stops. + + - _Pressed and hold for 6 s_ : Initiates the factory reset of the device. + Releasing the button within the 6-second window cancels the factory reset + procedure. **LEDs** blink in unison when the factory reset procedure is + initiated. + +* You can provision and control the Chip device using the python controller, + Chip tool standalone, Android or iOS app + + [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + +Here is some CHIPTool examples: + + Pairing with chip-tool: + ``` + chip-tool pairing ble-thread 1 hex: 20202021 3840 + ``` + + Request Self-Test: + ``` + chip-tool smokecoalarm self-test-request 1 1 + ``` + +### Notes + +- Depending on your network settings your router might not provide native ipv6 + addresses to your devices (Border router / PC). If this is the case, you + need to add a static ipv6 addresses on both device and then an ipv6 route to + the border router on your PC + + - On Border Router: `sudo ip addr add dev 2002::2/64` + + - On PC(Linux): `sudo ip addr add dev 2002::1/64` + + - Add Ipv6 route on PC(Linux) + `sudo ip route add /64 via 2002::2` + +## Memory settings + +While most of the RAM usage in CHIP is static, allowing easier debugging and +optimization with symbols analysis, we still need some HEAP for the crypto and +OpenThread. Size of the HEAP can be modified by changing the value of the +`configTOTAL_HEAP_SIZE` define inside of the FreeRTOSConfig.h file of this +example. Please take note that a HEAP size smaller than 13k can and will cause a +Mbedtls failure during the BLE rendez-vous or CASE session + +To track memory usage you can set `enable_heap_monitoring = true` either in the +BUILD.gn file or pass it as a build argument to gn. This will print on the RTT +console the RAM usage of each individual task and the number of Memory +allocation and Free. While this is not extensive monitoring you're welcome to +modify `examples/platform/silabs/efr32/MemMonitoring.cpp` to add your own memory +tracking code inside the `trackAlloc` and `trackFree` function + +## OTA Software Update + +For the description of Software Update process with EFR32 example applications +see +[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) + +## Building options + +All of Silabs's examples within the Matter repo have all the features enabled by +default, as to provide the best end user experience. However some of those +features can easily be toggled on or off. Here is a short list of options : + +### Disabling logging + +`chip_progress_logging, chip_detail_logging, chip_automation_logging` + + ``` + $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + ``` + +### Debug build / release build + +`is_debug` + + ``` + $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app BRD4164A "is_debug=false" + ``` + +### Disabling LCD + +`show_qr_code` + + ``` + $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app BRD4164A "show_qr_code=false" + ``` + +### KVS maximum entry count + +`kvs_max_entries` + + ``` + Set the maximum Kvs entries that can be stored in NVM (Default 75) + Thresholds: 30 <= kvs_max_entries <= 255 + + $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app BRD4164A kvs_max_entries=50 + ``` diff --git a/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni b/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni new file mode 100644 index 00000000000000..047de7f34492df --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni @@ -0,0 +1,23 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//build_overrides/chip.gni") +import("${chip_root}/config/standalone/args.gni") + +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") +chip_enable_openthread = false +import("${chip_root}/src/platform/silabs/wifi_args.gni") + +chip_enable_ota_requestor = true +app_data_model = + "${chip_root}/examples/smoke-co-alarm-app/smoke-co-alarm-common" diff --git a/examples/smoke-co-alarm-app/silabs/build_for_wifi_gnfile.gn b/examples/smoke-co-alarm-app/silabs/build_for_wifi_gnfile.gn new file mode 100644 index 00000000000000..bf3341592d03c6 --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/build_for_wifi_gnfile.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_enable_wifi = true + import("//build_for_wifi_args.gni") +} diff --git a/examples/dynamic-bridge-app/linux/build_overrides b/examples/smoke-co-alarm-app/silabs/build_overrides similarity index 100% rename from examples/dynamic-bridge-app/linux/build_overrides rename to examples/smoke-co-alarm-app/silabs/build_overrides diff --git a/examples/smoke-co-alarm-app/silabs/include/AppConfig.h b/examples/smoke-co-alarm-app/silabs/include/AppConfig.h new file mode 100644 index 00000000000000..c14a373e223c0d --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/include/AppConfig.h @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "silabs_utils.h" + +// ---- Smoke CO Alarm Example App Config ---- + +#define APP_TASK_NAME "Alm" + +#define BLE_DEV_NAME "SiLabs-Alarm" + +// Time it takes in ms for the simulated actuator to move from one +// state to another. +#define ACTUATOR_MOVEMENT_PERIOS_MS 10 + +#define ON_DEMO_BITMAP \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, \ + 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x1f, 0xfe, 0x07, 0xe0, \ + 0x7f, 0xf8, 0xff, 0xff, 0x3f, 0xfc, 0x00, 0x00, 0x3f, 0xfc, 0xff, 0xff, 0x7f, 0x3c, 0xe0, 0x07, 0x3c, 0xfe, 0xff, 0xff, \ + 0xff, 0x1f, 0xfe, 0x7f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, \ + 0xe3, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, \ + 0xff, 0xf1, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, \ + 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xff, 0x0f, 0x38, 0xfe, 0xff, 0xff, 0x7f, 0x1c, 0xf0, 0x0f, 0x38, 0xfe, 0x03, 0xc0, 0x7f, 0x1c, 0xf0, 0x0f, \ + 0x38, 0xfe, 0x27, 0xe9, 0x7f, 0x1c, 0xf0, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xe7, 0xe7, 0x7f, 0xfc, 0xff, 0xff, 0x7f, 0xfe, 0xef, 0xf7, 0x7f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xef, 0xf7, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xfc, 0xef, 0xf3, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xcf, 0xf3, \ + 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xdf, 0xfb, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xdf, 0xfb, 0x8f, 0xff, 0xff, 0xff, \ + 0xff, 0xe3, 0x9f, 0xf9, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x9f, 0xf9, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xc7, 0x9f, 0xfd, \ + 0xe3, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xbf, 0xfd, 0xf1, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x3f, 0xfc, 0xf8, 0xff, 0xff, 0xff, \ + 0xff, 0x3f, 0x3e, 0x7c, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0x3f, \ + 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0x8f, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + +#define OFF_DEMO_BITMAP \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xe0, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xe0, 0x07, 0xfc, 0xff, 0xff, 0xff, \ + 0xff, 0x1f, 0xfe, 0x7f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, \ + 0xe3, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, \ + 0xff, 0xf1, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, \ + 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, \ + 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, \ + 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, \ + 0xff, 0xe3, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, \ + 0xe3, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, \ + 0xff, 0x3f, 0xfe, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0x3f, \ + 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0x8f, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff diff --git a/examples/smoke-co-alarm-app/silabs/include/AppEvent.h b/examples/smoke-co-alarm-app/silabs/include/AppEvent.h new file mode 100644 index 00000000000000..81a9770ef38b40 --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/include/AppEvent.h @@ -0,0 +1,53 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + kEventType_Alarm, + kEventType_Install, + }; + + uint16_t Type; + + union + { + struct + { + uint8_t Action; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + uint8_t Action; + int32_t Actor; + } AlarmEvent; + }; + + EventHandler Handler; +}; diff --git a/examples/smoke-co-alarm-app/silabs/include/AppTask.h b/examples/smoke-co-alarm-app/silabs/include/AppTask.h new file mode 100644 index 00000000000000..b91ef5e1335a28 --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/include/AppTask.h @@ -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. + */ + +#pragma once + +/********************************************************** + * Includes + *********************************************************/ + +#include +#include + +#include "AppEvent.h" +#include "BaseApplication.h" +#include "FreeRTOS.h" +#include "SmokeCoAlarmManager.h" +#include "timers.h" // provides FreeRTOS timer support +#include +#include +#include + +/********************************************************** + * Defines + *********************************************************/ + +// Application-defined error codes in the CHIP_ERROR space. +#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) +#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) +#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) +#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) +#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) +#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) + +/********************************************************** + * AppTask Declaration + *********************************************************/ + +class AppTask : public BaseApplication +{ + +public: + AppTask() = default; + + static AppTask & GetAppTask() { return sAppTask; } + + /** + * @brief AppTask task main loop function + * + * @param pvParameter FreeRTOS task parameter + */ + static void AppTaskMain(void * pvParameter); + + CHIP_ERROR StartAppTask(); + + /** + * @brief Event handler when a button is pressed + * Function posts an event for button processing + * + * @param button APP_LIGHT_SWITCH or APP_FUNCTION_BUTTON + * @param btnAction button action - SL_SIMPLE_BUTTON_PRESSED, + * SL_SIMPLE_BUTTON_RELEASED or SL_SIMPLE_BUTTON_DISABLED + */ + static void ButtonEventHandler(uint8_t button, uint8_t btnAction); + +private: + static AppTask sAppTask; + + /** + * @brief AppTask initialisation function + * + * @return CHIP_ERROR + */ + CHIP_ERROR Init(); + + /** + * @brief PB0 Button event processing function + * Press and hold will trigger a factory reset timer start + * Press and release will restart BLEAdvertising if not commisionned + * + * @param aEvent button event being processed + */ + static void ButtonHandler(AppEvent * aEvent); + + /** + * @brief PB1 Button event processing function + * Function triggers a button action sent to the CHIP task + * + * @param aEvent button event being processed + */ + static void ButtonActionEventHandler(AppEvent * aEvent); +}; diff --git a/examples/smoke-co-alarm-app/silabs/include/CHIPProjectConfig.h b/examples/smoke-co-alarm-app/silabs/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..692a486448d6c7 --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/include/CHIPProjectConfig.h @@ -0,0 +1,102 @@ +/* + * + * 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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + * 0x8005: example lighting app + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in Chip NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * @def CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL + * + * @brief + * Active retransmit interval, or time to wait before retransmission after + * subsequent failures in milliseconds. + * + * This is the default value, that might be adjusted by end device depending on its + * needs (e.g. sleeping period) using Service Discovery TXT record CRA key. + * + */ +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) + +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 diff --git a/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h b/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h new file mode 100644 index 00000000000000..d8047f6ea600b6 --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h @@ -0,0 +1,53 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#include "AppEvent.h" + +#include "FreeRTOS.h" +#include "timers.h" // provides FreeRTOS timer support +#include + +#include + +class SmokeCoAlarmManager +{ +public: + CHIP_ERROR Init(); + + /** + * @brief Execute the self-test process and attribute changes + * + */ + bool StartSelfTesting(); + +private: + friend SmokeCoAlarmManager & AlarmMgr(void); + + chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum mExpressedState; + + static SmokeCoAlarmManager sAlarm; +}; + +inline SmokeCoAlarmManager & AlarmMgr(void) +{ + return SmokeCoAlarmManager::sAlarm; +} diff --git a/examples/smoke-co-alarm-app/silabs/openthread.gn b/examples/smoke-co-alarm-app/silabs/openthread.gn new file mode 100644 index 00000000000000..7f32969d422a63 --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/openthread.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") +} diff --git a/examples/dynamic-bridge-app/linux/args.gni b/examples/smoke-co-alarm-app/silabs/openthread.gni similarity index 59% rename from examples/dynamic-bridge-app/linux/args.gni rename to examples/smoke-co-alarm-app/silabs/openthread.gni index 21ee92ef761b4d..650b338de86f93 100644 --- a/examples/dynamic-bridge-app/linux/args.gni +++ b/examples/smoke-co-alarm-app/silabs/openthread.gni @@ -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,15 +13,15 @@ # limitations under the License. import("//build_overrides/chip.gni") - import("${chip_root}/config/standalone/args.gni") +import("${chip_root}/src/platform/silabs/efr32/args.gni") -chip_device_project_config_include = "" -chip_project_config_include = "" -chip_system_project_config_include = "" +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") -chip_project_config_include_dirs = - [ "${chip_root}/examples/dynamic-bridge-app/bridge-common/include" ] -chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] +app_data_model = + "${chip_root}/examples/smoke-co-alarm-app/smoke-co-alarm-common" +chip_enable_ota_requestor = true +chip_enable_openthread = true -cpp_standard="c++17" +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp b/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp new file mode 100644 index 00000000000000..4c5ee14f584d1b --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp @@ -0,0 +1,163 @@ +/* + * + * 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 "AppTask.h" +#include "AppConfig.h" +#include "AppEvent.h" + +#include "LEDWidget.h" + +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +#include + +#include + +#if defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) +#define LIGHT_LED 1 +#else +#define LIGHT_LED 0 +#endif + +#define APP_FUNCTION_BUTTON 0 +#define APP_SELFTESTREQUEST_BUTTON 1 + +using namespace chip; +using namespace chip::app; +using namespace ::chip::DeviceLayer; +using namespace ::chip::DeviceLayer::Silabs; + +namespace { +LEDWidget sAlarmLED; +} + +using namespace chip::TLV; +using namespace ::chip::DeviceLayer; + +AppTask AppTask::sAppTask; + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(AppTask::ButtonEventHandler); + +#ifdef DISPLAY_ENABLED + GetLCD().Init((uint8_t *) "Smoke-CO-Alarm-App"); +#endif + + err = BaseApplication::Init(); + if (err != CHIP_NO_ERROR) + { + SILABS_LOG("BaseApplication::Init() failed"); + appError(err); + } + + err = AlarmMgr().Init(); + if (err != CHIP_NO_ERROR) + { + SILABS_LOG("AlarmMgr::Init() failed"); + appError(err); + } + + sAlarmLED.Init(LIGHT_LED); + sAlarmLED.Set(false); + +// Update the LCD with the Stored value. Show QR Code if not provisioned +#ifdef DISPLAY_ENABLED + GetLCD().WriteDemoUI(false); +#ifdef QR_CODE_ENABLED +#ifdef SL_WIFI + if (!ConnectivityMgr().IsWiFiStationProvisioned()) +#else + if (!ConnectivityMgr().IsThreadProvisioned()) +#endif /* !SL_WIFI */ + { + GetLCD().ShowQRCode(true, true); + } +#endif // QR_CODE_ENABLED +#endif + + return err; +} + +CHIP_ERROR AppTask::StartAppTask() +{ + return BaseApplication::StartAppTask(AppTaskMain); +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + QueueHandle_t sAppEventQueue = *(static_cast(pvParameter)); + + CHIP_ERROR err = sAppTask.Init(); + if (err != CHIP_NO_ERROR) + { + SILABS_LOG("AppTask.Init() failed"); + appError(err); + } + +#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) + sAppTask.StartStatusLEDTimer(); +#endif + + SILABS_LOG("App Task started"); + + while (true) + { + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); + while (eventReceived == pdTRUE) + { + sAppTask.DispatchEvent(&event); + eventReceived = xQueueReceive(sAppEventQueue, &event, 0); + } + } +} + +void AppTask::ButtonActionEventHandler(AppEvent * aEvent) +{ + SILABS_LOG("Button pressed!"); +} + +void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction) +{ + AppEvent button_event = {}; + button_event.Type = AppEvent::kEventType_Button; + button_event.ButtonEvent.Action = btnAction; + + if (button == APP_SELFTESTREQUEST_BUTTON && btnAction == static_cast(SilabsPlatform::ButtonAction::ButtonPressed)) + { + button_event.Handler = ButtonActionEventHandler; + AppTask::GetAppTask().PostEvent(&button_event); + } + else if (button == APP_FUNCTION_BUTTON) + { + button_event.Handler = BaseApplication::ButtonHandler; + AppTask::GetAppTask().PostEvent(&button_event); + } +} diff --git a/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp b/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp new file mode 100644 index 00000000000000..8b1b3544ef75af --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp @@ -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. + */ + +#include "SmokeCoAlarmManager.h" + +#include "AppConfig.h" +#include "AppTask.h" +#include + +#include + +using namespace chip; +using namespace ::chip::app::Clusters::SmokeCoAlarm; +using namespace ::chip::DeviceLayer; + +SmokeCoAlarmManager SmokeCoAlarmManager::sAlarm; + +CHIP_ERROR SmokeCoAlarmManager::Init() +{ + ExpressedStateEnum currentExpressedState = ExpressedStateEnum::kNormal; + // read current ExpressedState on endpoint one + chip::DeviceLayer::PlatformMgr().LockChipStack(); + SmokeCoAlarmServer::Instance().GetExpressedState(1, currentExpressedState); + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + + mExpressedState = currentExpressedState; + + return CHIP_NO_ERROR; +} + +bool SmokeCoAlarmManager::StartSelfTesting() +{ + bool success = SmokeCoAlarmServer::Instance().SetTestInProgress(1, true); + + if (success) + { + SILABS_LOG("Start self-testing!"); + + SILABS_LOG("End self-testing!"); + } + + SmokeCoAlarmServer::Instance().SetExpressedState(1, mExpressedState); + SmokeCoAlarmServer::Instance().SetTestInProgress(1, false); + + return success; +} diff --git a/examples/smoke-co-alarm-app/silabs/src/ZclCallbacks.cpp b/examples/smoke-co-alarm-app/silabs/src/ZclCallbacks.cpp new file mode 100644 index 00000000000000..28c84a6b206e8d --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/src/ZclCallbacks.cpp @@ -0,0 +1,67 @@ +/* + * + * 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. + */ + +/** + * @file + * This file implements the handler for data model messages. + */ + +#include "AppConfig.h" +#include "SmokeCoAlarmManager.h" + +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, + uint8_t * value) +{ + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); + + if (clusterId == SmokeCoAlarm::Id && attributeId == SmokeCoAlarm::Attributes::ExpressedState::Id) + { + static_assert(sizeof(SmokeCoAlarm::ExpressedStateEnum) == 1, "Wrong size"); + SmokeCoAlarm::ExpressedStateEnum expressedState = *(reinterpret_cast(value)); + ChipLogProgress(Zcl, "Smoke CO Alarm cluster: " ChipLogFormatMEI " state %d", ChipLogValueMEI(clusterId), + to_underlying(expressedState)); + } +} + +/** @brief Smoke CO Alarm Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfSmokeCoAlarmClusterInitCallback(EndpointId endpoint) +{ + // TODO: implement any additional Cluster Server init actions +} + +bool emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) +{ + return AlarmMgr().StartSelfTesting(); +} diff --git a/examples/smoke-co-alarm-app/silabs/third_party/connectedhomeip b/examples/smoke-co-alarm-app/silabs/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni b/examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni new file mode 100644 index 00000000000000..8312252d1a56c9 --- /dev/null +++ b/examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni @@ -0,0 +1,34 @@ +# 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. + +# add this gni as import in your build args to use pigweed in the example +# 'import("//with_pw_rpc.gni")' + +import("//build_overrides/chip.gni") +import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni") +import("${chip_root}/examples/platform/silabs/args.gni") + +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +app_data_model = + "${chip_root}/examples/smoke-co-alarm-app/smoke-co-alarm-common" +chip_enable_pw_rpc = true +chip_enable_openthread = true +chip_openthread_ftd = true + +cpp_standard = "gnu++17" + +# To fit in flash +chip_detail_logging = false +show_qr_code = false diff --git a/src/lib/assign/BUILD.gn b/examples/smoke-co-alarm-app/smoke-co-alarm-common/BUILD.gn similarity index 71% rename from src/lib/assign/BUILD.gn rename to examples/smoke-co-alarm-app/smoke-co-alarm-common/BUILD.gn index 12eec411187142..16e5328c1ba01c 100644 --- a/src/lib/assign/BUILD.gn +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/BUILD.gn @@ -12,11 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +import("${chip_root}/src/app/chip_data_model.gni") -static_library("assign") { - sources = [ "ValueAssign.h" ] +chip_data_model("smoke-co-alarm-common") { + zap_file = "smoke-co-alarm-app.zap" - public_deps = [ "${chip_root}/src/lib/support" ] + zap_pregenerated_dir = + "${chip_root}/zzz_generated/smoke-co-alarm-app/zap-generated" + is_server = true } diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter similarity index 77% rename from examples/dynamic-bridge-app/bridge-common/bridge-app.matter rename to examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index 30bdd0efe899c5..efe45e7e9a6c70 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -57,158 +69,6 @@ server cluster Identify = 3 { command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } -/** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : ENUM8 { - kFadeToOffIn0p8Seconds = 0; - kNoFade = 1; - k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; - } - - enum OnOffDyingLightEffectVariant : ENUM8 { - k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; - } - - enum OnOffEffectIdentifier : ENUM8 { - kDelayedAllOff = 0; - kDyingLight = 1; - } - - enum OnOffStartUpOnOff : ENUM8 { - kOff = 0; - kOn = 1; - kTogglePreviousOnOff = 2; - } - - bitmap Feature : BITMAP32 { - kLighting = 0x1; - } - - bitmap OnOffControl : BITMAP8 { - kAcceptOnlyWhenOn = 0x1; - } - - readonly attribute boolean onOff = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - command Off(): DefaultSuccess = 0; - command On(): DefaultSuccess = 1; - command Toggle(): DefaultSuccess = 2; -} - -/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { - enum MoveMode : ENUM8 { - kUp = 0; - kDown = 1; - } - - enum StepMode : ENUM8 { - kUp = 0; - kDown = 1; - } - - bitmap Feature : BITMAP32 { - kOnOff = 0x1; - kLighting = 0x2; - kFrequency = 0x4; - } - - bitmap LevelControlOptions : BITMAP8 { - kExecuteIfOff = 0x1; - kCoupleColorTempToLevel = 0x2; - } - - readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; - attribute LevelControlOptions options = 15; - attribute int16u onOffTransitionTime = 16; - attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct MoveToLevelRequest { - INT8U level = 0; - nullable INT16U transitionTime = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct MoveRequest { - MoveMode moveMode = 0; - nullable INT8U rate = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct StepRequest { - StepMode stepMode = 0; - INT8U stepSize = 1; - nullable INT16U transitionTime = 2; - LevelControlOptions optionsMask = 3; - LevelControlOptions optionsOverride = 4; - } - - request struct StopRequest { - LevelControlOptions optionsMask = 0; - LevelControlOptions optionsOverride = 1; - } - - request struct MoveToLevelWithOnOffRequest { - INT8U level = 0; - nullable INT16U transitionTime = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct MoveWithOnOffRequest { - MoveMode moveMode = 0; - nullable INT8U rate = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct StepWithOnOffRequest { - StepMode stepMode = 0; - INT8U stepSize = 1; - nullable INT16U transitionTime = 2; - LevelControlOptions optionsMask = 3; - LevelControlOptions optionsOverride = 4; - } - - request struct StopWithOnOffRequest { - LevelControlOptions optionsMask = 0; - LevelControlOptions optionsOverride = 1; - } - - command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; - command Move(MoveRequest): DefaultSuccess = 1; - command Step(StepRequest): DefaultSuccess = 2; - command Stop(StopRequest): DefaultSuccess = 3; - command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; - command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; - command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -228,98 +88,6 @@ server cluster Descriptor = 29 { readonly attribute int16u clusterRevision = 65533; } -/** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { - fabric_scoped struct TargetStruct { - optional node_id node = 1; - optional group_id group = 2; - optional endpoint_no endpoint = 3; - optional cluster_id cluster = 4; - fabric_idx fabricIndex = 254; - } - - attribute TargetStruct binding[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** The Access Control Cluster exposes a data model view of a - Node's Access Control List (ACL), which codifies the rules used to manage - and enforce Access Control for the Node's endpoints and their associated - cluster instances. */ -client cluster AccessControl = 31 { - enum AccessControlEntryAuthModeEnum : ENUM8 { - kPase = 1; - kCase = 2; - kGroup = 3; - } - - enum AccessControlEntryPrivilegeEnum : ENUM8 { - kView = 1; - kProxyView = 2; - kOperate = 3; - kManage = 4; - kAdminister = 5; - } - - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - struct AccessControlTargetStruct { - nullable cluster_id cluster = 0; - nullable endpoint_no endpoint = 1; - nullable devtype_id deviceType = 2; - } - - fabric_scoped struct AccessControlEntryStruct { - fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; - fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; - nullable fabric_sensitive int64u subjects[] = 3; - nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; - fabric_idx fabricIndex = 254; - } - - fabric_scoped struct AccessControlExtensionStruct { - fabric_sensitive octet_string<128> data = 1; - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { - nullable node_id adminNodeID = 1; - nullable INT16U adminPasscodeID = 2; - ChangeTypeEnum changeType = 3; - nullable AccessControlEntryStruct latestValue = 4; - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { - nullable node_id adminNodeID = 1; - nullable INT16U adminPasscodeID = 2; - ChangeTypeEnum changeType = 3; - nullable AccessControlExtensionStruct latestValue = 4; - fabric_idx fabricIndex = 254; - } - - attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; - readonly attribute int16u subjectsPerAccessControlEntry = 2; - readonly attribute int16u targetsPerAccessControlEntry = 3; - readonly attribute int16u accessControlEntriesPerFabric = 4; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** The Access Control Cluster exposes a data model view of a Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated @@ -393,98 +161,6 @@ server cluster AccessControl = 31 { readonly attribute int16u clusterRevision = 65533; } -/** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ -server cluster Actions = 37 { - enum ActionErrorEnum : ENUM8 { - kUnknown = 0; - kInterrupted = 1; - } - - enum ActionStateEnum : ENUM8 { - kInactive = 0; - kActive = 1; - kPaused = 2; - kDisabled = 3; - } - - enum ActionTypeEnum : ENUM8 { - kOther = 0; - kScene = 1; - kSequence = 2; - kAutomation = 3; - kException = 4; - kNotification = 5; - kAlarm = 6; - } - - enum EndpointListTypeEnum : ENUM8 { - kOther = 0; - kRoom = 1; - kZone = 2; - } - - bitmap CommandBits : BITMAP16 { - kInstantAction = 0x1; - kInstantActionWithTransition = 0x2; - kStartAction = 0x4; - kStartActionWithDuration = 0x8; - kStopAction = 0x10; - kPauseAction = 0x20; - kPauseActionWithDuration = 0x40; - kResumeAction = 0x80; - kEnableAction = 0x100; - kEnableActionWithDuration = 0x200; - kDisableAction = 0x400; - kDisableActionWithDuration = 0x800; - } - - struct ActionStruct { - int16u actionID = 0; - char_string<32> name = 1; - ActionTypeEnum type = 2; - int16u endpointListID = 3; - CommandBits supportedCommands = 4; - ActionStateEnum state = 5; - } - - struct EndpointListStruct { - int16u endpointListID = 0; - char_string<32> name = 1; - EndpointListTypeEnum type = 2; - endpoint_no endpoints[] = 3; - } - - info event StateChanged = 0 { - INT16U actionID = 0; - INT32U invokeID = 1; - ActionStateEnum newState = 2; - } - - info event ActionFailed = 1 { - INT16U actionID = 0; - INT32U invokeID = 1; - ActionStateEnum newState = 2; - ActionErrorEnum error = 3; - } - - readonly attribute ActionStruct actionList[] = 0; - readonly attribute EndpointListStruct endpointLists[] = 1; - readonly attribute long_char_string<512> setupURL = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct InstantActionRequest { - INT16U actionID = 0; - optional INT32U invokeID = 1; - } - - command InstantAction(InstantActionRequest): DefaultSuccess = 0; -} - /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ @@ -574,6 +250,155 @@ server cluster BasicInformation = 40 { readonly attribute int16u clusterRevision = 65533; } +/** Provides an interface for providing OTA software updates */ +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct QueryImageRequest { + vendor_id vendorID = 0; + INT16U productID = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING<2> location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING<256> imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING<64> softwareVersionString = 4; + optional OCTET_STRING<32> updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + nullable INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting standards. As such, Nodes that visually or audibly convey information need a mechanism by which @@ -625,22 +450,242 @@ server cluster TimeFormatLocalization = 44 { readonly attribute int16u clusterRevision = 65533; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for the units in which values are conveyed in communication to a - user. As such, Nodes that visually or audibly convey measurable values to the user need a - mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { - enum TempUnitEnum : ENUM8 { - kFahrenheit = 0; - kCelsius = 1; - kKelvin = 2; +/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ +server cluster PowerSourceConfiguration = 46 { + readonly attribute INT8U sources[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ +server cluster PowerSource = 47 { + enum BatApprovedChemistryEnum : ENUM16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : ENUM8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : ENUM8 { + kOk = 0; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : ENUM8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : ENUM16 { + kUnspecified = 0; + kAaa = 1; + kAa = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12aa = 8; + kAaaa = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBa5800 = 18; + kDuplex = 19; + k4sr44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCr123a = 29; + kCr2 = 30; + k2cr5 = 31; + kCrP2 = 32; + kCrV3 = 33; + kSr41 = 34; + kSr43 = 35; + kSr44 = 36; + kSr45 = 37; + kSr48 = 38; + kSr54 = 39; + kSr55 = 40; + kSr57 = 41; + kSr58 = 42; + kSr59 = 43; + kSr60 = 44; + kSr63 = 45; + kSr64 = 46; + kSr65 = 47; + kSr66 = 48; + kSr67 = 49; + kSr68 = 50; + kSr69 = 51; + kSr516 = 52; + kSr731 = 53; + kSr712 = 54; + kLr932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAc41e = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRcr123a = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : ENUM8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : ENUM8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : ENUM8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : ENUM8 { + kAc = 0; + kDc = 1; + } + + enum WiredFaultEnum : ENUM8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; } bitmap Feature : BITMAP32 { - kTemperatureUnit = 0x1; + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + kReplaceable = 0x8; } - attribute TempUnitEnum temperatureUnit = 0; + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event WiredFaultChange = 0 { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute nullable int32u wiredAssessedCurrent = 6; + readonly attribute BatChargeLevelEnum batChargeLevel = 14; + readonly attribute boolean batReplacementNeeded = 15; + readonly attribute BatReplaceabilityEnum batReplaceability = 16; + readonly attribute char_string<60> batReplacementDescription = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1025,6 +1070,8 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ @@ -1186,6 +1233,8 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ @@ -1258,6 +1307,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ @@ -1299,59 +1350,6 @@ server cluster EthernetNetworkDiagnostics = 55 { command ResetCounts(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute int8u multiPressMax = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1563,10 +1561,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1578,7 +1572,24 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ +server cluster FixedLabel = 64 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + readonly attribute LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ @@ -1597,31 +1608,118 @@ server cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { - readonly attribute nullable int16s measuredValue = 0; - readonly attribute nullable int16s minMeasuredValue = 1; - readonly attribute nullable int16s maxMeasuredValue = 2; +/** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */ +server cluster SmokeCoAlarm = 92 { + enum AlarmStateEnum : ENUM8 { + kNormal = 0; + kWarning = 1; + kCritical = 2; + } + + enum ContaminationStateEnum : ENUM8 { + kNormal = 0; + kLow = 1; + kWarning = 2; + kCritical = 3; + } + + enum EndOfServiceEnum : ENUM8 { + kExpired = 0; + kNormal = 1; + } + + enum ExpressedStateEnum : ENUM8 { + kNormal = 0; + kSmokeAlarm = 1; + kCOAlarm = 2; + kBatteryAlert = 3; + kTesting = 4; + kHardwareFault = 5; + kEndOfService = 6; + kInterconnectSmoke = 7; + kInterconnectCO = 8; + } + + enum MuteStateEnum : ENUM8 { + kNotMuted = 0; + kMuted = 1; + } + + enum SensitivityEnum : ENUM8 { + kHigh = 0; + kStandard = 1; + kLow = 2; + } + + bitmap Feature : BITMAP32 { + kSmokeAlarm = 0x1; + kCoAlarm = 0x2; + } + + info event SmokeAlarm = 0 { + } + + info event COAlarm = 1 { + } + + info event LowBattery = 2 { + } + + info event HardwareFault = 3 { + } + + info event EndOfService = 4 { + } + + info event SelfTestComplete = 5 { + } + + info event AlarmMuted = 6 { + } + + info event MuteEnded = 7 { + } + + info event InterconnectSmokeAlarm = 8 { + } + + info event InterconnectCOAlarm = 9 { + } + + info event AllClear = 10 { + } + + readonly attribute ExpressedStateEnum expressedState = 0; + readonly attribute AlarmStateEnum smokeState = 1; + readonly attribute AlarmStateEnum COState = 2; + readonly attribute AlarmStateEnum batteryAlert = 3; + readonly attribute MuteStateEnum deviceMuted = 4; + readonly attribute boolean testInProgress = 5; + readonly attribute boolean hardwareFaultAlert = 6; + readonly attribute EndOfServiceEnum endOfServiceAlert = 7; + readonly attribute AlarmStateEnum interconnectSmokeAlarm = 8; + readonly attribute AlarmStateEnum interconnectCOAlarm = 9; + readonly attribute ContaminationStateEnum contaminationState = 10; + attribute SensitivityEnum sensitivityLevel = 11; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command SelfTestRequest(): DefaultSuccess = 0; } endpoint 0 { - device type bridge = 22, version 1; - binding cluster AccessControl; + device type rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; callback attribute clientList; callback attribute partsList; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -1634,8 +1732,6 @@ endpoint 0 { callback attribute subjectsPerAccessControlEntry default = 4; callback attribute targetsPerAccessControlEntry default = 3; callback attribute accessControlEntriesPerFabric default = 4; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1664,9 +1760,18 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OtaSoftwareUpdateRequestor { + emits event StateTransition; + emits event VersionApplied; + emits event DownloadError; + callback attribute defaultOTAProviders default = 0; + ram attribute updatePossible default = 1; + ram attribute updateState default = 0; + ram attribute updateStateProgress default = 0; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1674,9 +1779,6 @@ endpoint 0 { server cluster LocalizationConfiguration { persist attribute activeLocale default = "en-US"; callback attribute supportedLocales; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1685,19 +1787,23 @@ endpoint 0 { persist attribute hourFormat default = 0; persist attribute activeCalendarType default = 0; callback attribute supportedCalendarTypes; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } - server cluster UnitLocalization { - persist attribute temperatureUnit default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0x1; + server cluster PowerSourceConfiguration { + callback attribute sources; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster PowerSource { + emits event WiredFaultChange; + ram attribute status default = 1; + ram attribute order default = 0; + ram attribute description default = "USB"; + ram attribute wiredAssessedCurrent; + ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; } @@ -1707,9 +1813,6 @@ endpoint 0 { callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; callback attribute supportsConcurrentConnection default = 1; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1723,9 +1826,6 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; } @@ -1736,6 +1836,9 @@ endpoint 0 { } server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; emits event BootReason; callback attribute networkInterfaces; callback attribute rebootCount default = 0x0000; @@ -1746,9 +1849,6 @@ endpoint 0 { callback attribute activeRadioFaults; callback attribute activeNetworkFaults; callback attribute testEventTriggersEnabled default = false; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1826,7 +1926,7 @@ endpoint 0 { callback attribute channelPage0Mask default = "0x0000"; callback attribute operationalDatasetComponents; callback attribute activeNetworkFaultsList; - ram attribute featureMap default = 15; + ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 1; } @@ -1869,9 +1969,6 @@ endpoint 0 { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; callback attribute adminVendorId default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1883,9 +1980,6 @@ endpoint 0 { callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1894,10 +1988,13 @@ endpoint 0 { callback attribute groupKeyMap; callback attribute groupTable; callback attribute maxGroupsPerFabric; - callback attribute maxGroupKeysPerFabric; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; + callback attribute maxGroupKeysPerFabric default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster FixedLabel { + callback attribute labelList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1909,97 +2006,57 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 14, version 1; - binding cluster Binding; server cluster Identify { - ram attribute identifyTime default = 0x0; + ram attribute identifyTime default = 0x0000; ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 4; } - server cluster Descriptor { - callback attribute deviceTypeList; - callback attribute serverList; - callback attribute clientList; - callback attribute partsList; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; + server cluster PowerSource { + ram attribute status default = 1; + ram attribute order default = 1; + ram attribute description default = "Battery"; + ram attribute batChargeLevel; + ram attribute batReplacementNeeded; + ram attribute batReplaceability; + ram attribute batReplacementDescription; + ram attribute featureMap default = 0x0A; ram attribute clusterRevision default = 1; } - server cluster Actions { - callback attribute actionList; - callback attribute endpointLists; - ram attribute setupURL default = "https://example.com"; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } -} -endpoint 2 { - device type dimmablelight = 257, version 1; - - server cluster OnOff { - ram attribute onOff default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - } - - server cluster LevelControl { - persist attribute currentLevel default = 0x00; - ram attribute remainingTime default = 0x0000; - ram attribute minLevel default = 0x01; - ram attribute maxLevel default = 0xFE; - ram attribute currentFrequency default = 0x0000; - ram attribute minFrequency default = 0x0000; - ram attribute maxFrequency default = 0x0000; - ram attribute options default = 0x00; - ram attribute onOffTransitionTime default = 0x0000; - ram attribute onLevel default = 0xFE; - ram attribute onTransitionTime; - ram attribute offTransitionTime; - ram attribute defaultMoveRate; - persist attribute startUpCurrentLevel default = 255; + server cluster SmokeCoAlarm { + emits event SmokeAlarm; + emits event COAlarm; + emits event LowBattery; + emits event HardwareFault; + emits event EndOfService; + emits event SelfTestComplete; + emits event AlarmMuted; + emits event MuteEnded; + emits event InterconnectSmokeAlarm; + emits event InterconnectCOAlarm; + emits event AllClear; + persist attribute expressedState default = 0; + persist attribute smokeState default = 0; + persist attribute COState default = 0; + persist attribute batteryAlert default = 0; + persist attribute deviceMuted default = 0; + ram attribute testInProgress default = 0; + persist attribute hardwareFaultAlert default = 0; + persist attribute endOfServiceAlert default = 1; + ram attribute interconnectSmokeAlarm default = 0; + ram attribute interconnectCOAlarm default = 0; + ram attribute contaminationState default = 0; + ram attribute sensitivityLevel default = 1; ram attribute featureMap default = 3; - ram attribute clusterRevision default = 5; - } - - server cluster Descriptor { - callback attribute deviceTypeList; - callback attribute serverList; - callback attribute clientList; - callback attribute partsList; - ram attribute featureMap default = 0; - callback attribute clusterRevision default = 1; - } - - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition default = 1; - ram attribute multiPressMax default = 2; - ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } - - server cluster TemperatureMeasurement { - callback attribute measuredValue; - callback attribute minMeasuredValue default = 0x954D; - callback attribute maxMeasuredValue default = 0x7FFF; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - callback attribute featureMap default = 0; - callback attribute clusterRevision default = 1; - } } diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap similarity index 67% rename from examples/dynamic-bridge-app/bridge-common/bridge-app.zap rename to examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap index 12cd73afba6aba..30e2f14b557c08 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap @@ -33,35 +33,29 @@ ], "endpointTypes": [ { - "name": "MA-bridge", + "name": "MA-rootdevice", "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ { - "name": "Descriptor", - "code": 29, + "name": "Identify", + "code": 3, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "IDENTIFY_CLUSTER", "side": "client", "enabled": 0, - "attributes": [ + "commands": [ { - "name": "FeatureMap", - "code": 65532, + "name": "Identify", + "code": 0, "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ { "name": "ClusterRevision", "code": 65533, @@ -72,7 +66,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "4", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -81,152 +75,116 @@ ] }, { - "name": "Descriptor", - "code": 29, + "name": "Identify", + "code": 3, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "IDENTIFY_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { - "name": "DeviceTypeList", + "name": "IdentifyTime", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ServerList", - "code": 1, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "4", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ { - "name": "ClientList", - "code": 2, + "name": "AddGroup", + "code": 0, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 0 }, { - "name": "PartsList", - "code": 3, + "name": "ViewGroup", + "code": 1, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "GetGroupMembership", + "code": 2, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "RemoveGroup", + "code": 3, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "RemoveAllGroups", + "code": 4, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "AddGroupIfIdentifying", + "code": 5, "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ { "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "4", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -235,197 +193,301 @@ ] }, { - "name": "Access Control", - "code": 31, + "name": "Groups", + "code": 4, "mfgCode": null, - "define": "ACCESS_CONTROL_CLUSTER", - "side": "client", - "enabled": 1, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], "attributes": [ { - "name": "FeatureMap", - "code": 65532, + "name": "NameSupport", + "code": 0, "mfgCode": null, - "side": "client", - "type": "bitmap32", + "side": "server", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "4", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "Access Control", - "code": 31, + "name": "Scenes", + "code": 5, "mfgCode": null, - "define": "ACCESS_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ { - "name": "ACL", + "name": "AddScene", "code": 0, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 0 }, { - "name": "Extension", + "name": "ViewScene", "code": 1, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 0 }, { - "name": "SubjectsPerAccessControlEntry", + "name": "RemoveScene", "code": 2, "mfgCode": null, - "side": "server", + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "4", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 }, { - "name": "TargetsPerAccessControlEntry", + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", "code": 3, "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "server", + "incoming": 0, + "outgoing": 1 }, { - "name": "AccessControlEntriesPerFabric", + "name": "StoreSceneResponse", "code": 4, "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "CurrentScene", + "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "CurrentGroup", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "group_id", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "SceneValid", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "NameSupport", + "code": 4, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "bitmap8", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -438,54 +500,48 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "4", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } - ], - "events": [ - { - "name": "AccessControlEntryChanged", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "AccessControlExtensionChanged", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { - "name": "Basic Information", - "code": 40, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "client", "enabled": 0, - "attributes": [ + "commands": [ { - "name": "FeatureMap", - "code": 65532, + "name": "Off", + "code": 0, "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ { "name": "ClusterRevision", "code": 65533, @@ -494,9 +550,9 @@ "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "4", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -505,360 +561,270 @@ ] }, { - "name": "Basic Information", - "code": 40, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { - "name": "DataModelRevision", + "name": "OnOff", "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "10", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "VendorName", - "code": 1, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "4", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ { - "name": "VendorID", - "code": 2, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", - "type": "vendor_id", + "side": "client", + "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "ProductName", - "code": 3, + "name": "DeviceTypeList", + "code": 0, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductID", - "code": 4, + "name": "ServerList", + "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NodeLabel", - "code": 5, + "name": "ClientList", + "code": 2, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, - "storageOption": "NVM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Location", - "code": 6, + "name": "PartsList", + "code": 3, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "XX", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "HardwareVersion", - "code": 7, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "bitmap32", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "HardwareVersionString", - "code": 8, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "SoftwareVersion", - "code": 9, + "name": "ACL", + "code": 0, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SoftwareVersionString", - "code": 10, + "name": "Extension", + "code": 1, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ManufacturingDate", - "code": 11, + "name": "SubjectsPerAccessControlEntry", + "code": 2, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "20210614123456ZZ", + "defaultValue": "4", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartNumber", - "code": 12, + "name": "TargetsPerAccessControlEntry", + "code": 3, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductURL", - "code": 13, - "mfgCode": null, - "side": "server", - "type": "long_char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductLabel", - "code": 14, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SerialNumber", - "code": 15, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LocalConfigDisabled", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "NVM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Reachable", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 0, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "UniqueID", - "code": 18, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CapabilityMinima", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "CapabilityMinimaStruct", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "AccessControlEntriesPerFabric", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "4", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -872,7 +838,7 @@ "type": "array", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, @@ -904,63 +870,40 @@ "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ], "events": [ { - "name": "StartUp", + "name": "AccessControlEntryChanged", "code": 0, "mfgCode": null, "side": "server", "included": 1 }, { - "name": "ShutDown", + "name": "AccessControlExtensionChanged", "code": 1, "mfgCode": null, "side": "server", "included": 1 - }, - { - "name": "Leave", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1 } ] }, { - "name": "Localization Configuration", - "code": 43, + "name": "Basic Information", + "code": 40, "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "client", "enabled": 0, "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -969,331 +912,349 @@ "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "Localization Configuration", - "code": 43, + "name": "Basic Information", + "code": 40, "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "ActiveLocale", + "name": "DataModelRevision", "code": 0, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, - "storageOption": "NVM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "10", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SupportedLocales", + "name": "VendorName", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "char_string", "included": 1, "storageOption": "External", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "VendorID", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "vendor_id", "included": 1, "storageOption": "External", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "ProductName", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "char_string", "included": 1, "storageOption": "External", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "ProductID", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "NodeLabel", + "code": 5, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "NVM", + "singleton": 1, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "Location", + "code": 6, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "XX", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + }, { - "name": "FeatureMap", - "code": 65532, + "name": "HardwareVersion", + "code": 7, "mfgCode": null, - "side": "client", - "type": "bitmap32", + "side": "server", + "type": "int16u", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "HardwareVersionString", + "code": 8, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "HourFormat", - "code": 0, + "name": "SoftwareVersion", + "code": 9, "mfgCode": null, "side": "server", - "type": "HourFormatEnum", + "type": "int32u", "included": 1, - "storageOption": "NVM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ActiveCalendarType", - "code": 1, + "name": "SoftwareVersionString", + "code": 10, "mfgCode": null, "side": "server", - "type": "CalendarTypeEnum", + "type": "char_string", "included": 1, - "storageOption": "NVM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SupportedCalendarTypes", - "code": 2, + "name": "ManufacturingDate", + "code": 11, "mfgCode": null, "side": "server", - "type": "array", + "type": "char_string", "included": 1, "storageOption": "External", - "singleton": 0, + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "ProductURL", + "code": 13, "mfgCode": null, "side": "server", - "type": "array", + "type": "long_char_string", "included": 1, "storageOption": "External", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "ProductLabel", + "code": 14, "mfgCode": null, "side": "server", - "type": "array", + "type": "char_string", "included": 1, "storageOption": "External", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "SerialNumber", + "code": 15, "mfgCode": null, "side": "server", - "type": "array", + "type": "char_string", "included": 1, "storageOption": "External", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "LocalConfigDisabled", + "code": 16, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "boolean", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "NVM", + "singleton": 1, "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "Reachable", + "code": 17, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "boolean", + "included": 0, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "1", "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + }, { "name": "FeatureMap", "code": 65532, "mfgCode": null, - "side": "client", + "side": "server", "type": "bitmap32", "included": 1, "storageOption": "RAM", @@ -1309,83 +1270,128 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { - "name": "Unit Localization", - "code": 45, + "name": "OTA Software Update Provider", + "code": 41, "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "server", + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", "enabled": 1, - "attributes": [ + "commands": [ { - "name": "TemperatureUnit", + "name": "QueryImage", "code": 0, "mfgCode": null, - "side": "server", - "type": "TempUnitEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 0, + "outgoing": 1 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "ApplyUpdateRequest", + "code": 2, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 0, + "outgoing": 1 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "NotifyUpdateApplied", + "code": 4, "mfgCode": null, - "side": "server", - "type": "array", + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ { "name": "AttributeList", "code": 65531, "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1401,11 +1407,11 @@ "mfgCode": null, "side": "server", "type": "bitmap32", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x1", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1423,62 +1429,30 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "General Commissioning", - "code": 48, + "name": "OTA Software Update Requestor", + "code": 42, "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "ArmFailSafe", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfig", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, "outgoing": 0 - }, - { - "name": "CommissioningComplete", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 } ], "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -1498,95 +1472,69 @@ ] }, { - "name": "General Commissioning", - "code": 48, + "name": "OTA Software Update Requestor", + "code": 42, "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "ArmFailSafeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfigResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "CommissioningCompleteResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], "attributes": [ { - "name": "Breadcrumb", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BasicCommissioningInfo", + "name": "UpdatePossible", "code": 1, "mfgCode": null, "side": "server", - "type": "BasicCommissioningInfo", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RegulatoryConfig", + "name": "UpdateState", "code": 2, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationTypeEnum", + "type": "OTAUpdateStateEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "LocationCapability", + "name": "UpdateStateProgress", "code": 3, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationTypeEnum", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -1596,166 +1544,131 @@ "reportableChange": 0 }, { - "name": "SupportsConcurrentConnection", - "code": 4, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "boolean", - "included": 1, + "type": "array", + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "included": 1 }, { - "name": "FeatureMap", - "code": 65532, + "name": "VersionApplied", + "code": 1, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "included": 1 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "DownloadError", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "included": 1 } ] }, { - "name": "Network Commissioning", - "code": 49, + "name": "Localization Configuration", + "code": 43, "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [ + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "ScanNetworks", + "name": "ActiveLocale", "code": 0, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddOrUpdateWiFiNetwork", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "AddOrUpdateThreadNetwork", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveNetwork", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "ConnectNetwork", - "code": 6, + "name": "SupportedLocales", + "code": 1, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, - { - "name": "ReorderNetwork", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ { "name": "FeatureMap", "code": 65532, "mfgCode": null, - "side": "client", + "side": "server", "type": "bitmap32", "included": 1, "storageOption": "RAM", @@ -1771,7 +1684,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -1779,86 +1692,68 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Network Commissioning", - "code": 49, + "name": "Time Format Localization", + "code": 44, "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "ScanNetworksResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "NetworkConfigResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ConnectNetworkResponse", - "code": 7, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], "attributes": [ { - "name": "MaxNetworks", + "name": "HourFormat", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "HourFormatEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Networks", + "name": "ActiveCalendarType", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "CalendarTypeEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ScanMaxTimeSeconds", + "name": "SupportedCalendarTypes", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1868,45 +1763,63 @@ "reportableChange": 0 }, { - "name": "ConnectMaxTimeSeconds", - "code": 3, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "InterfaceEnabled", - "code": 4, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ { - "name": "LastNetworkingStatus", - "code": 5, + "name": "TemperatureUnit", + "code": 0, "mfgCode": null, "side": "server", - "type": "NetworkCommissioningStatusEnum", - "included": 1, - "storageOption": "RAM", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1916,40 +1829,58 @@ "reportableChange": 0 }, { - "name": "LastNetworkID", - "code": 6, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastConnectErrorValue", - "code": 7, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int32s", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "GeneratedCommandList", - "code": 65528, + "name": "Sources", + "code": 0, "mfgCode": null, "side": "server", "type": "array", @@ -1964,89 +1895,119 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "Order", + "code": 1, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "Description", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "char_string", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "USB", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Diagnostic Logs", - "code": 50, - "mfgCode": null, - "define": "DIAGNOSTIC_LOGS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ + }, { - "name": "RetrieveLogsRequest", - "code": 0, + "name": "WiredAssessedCurrent", + "code": 6, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2057,7 +2018,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2079,42 +2040,51 @@ "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "WiredFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { - "name": "General Diagnostics", - "code": 51, + "name": "General Commissioning", + "code": 48, "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "define": "GENERAL_COMMISSIONING_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "TestEventTrigger", + "name": "ArmFailSafe", "code": 0, "mfgCode": null, "source": "client", "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 } ], "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -2134,139 +2104,283 @@ ] }, { - "name": "General Diagnostics", - "code": 51, + "name": "General Commissioning", + "code": 48, "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "define": "GENERAL_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "TestEventTrigger", - "code": 0, + "name": "ArmFailSafeResponse", + "code": 1, "mfgCode": null, - "source": "client", + "source": "server", "incoming": 1, - "outgoing": 0 + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 } ], "attributes": [ { - "name": "NetworkInterfaces", + "name": "Breadcrumb", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RebootCount", + "name": "BasicCommissioningInfo", "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "BasicCommissioningInfo", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "UpTime", + "name": "RegulatoryConfig", "code": 2, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TotalOperationalHours", + "name": "LocationCapability", "code": 3, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BootReason", + "name": "SupportsConcurrentConnection", "code": 4, "mfgCode": null, "side": "server", - "type": "BootReasonEnum", + "type": "boolean", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveHardwareFaults", - "code": 5, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveRadioFaults", - "code": 6, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 }, { - "name": "ActiveNetworkFaults", + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", "code": 7, "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, "side": "server", "type": "array", "included": 1, @@ -2280,29 +2394,61 @@ "reportableChange": 0 }, { - "name": "TestEventTriggersEnabled", - "code": 8, + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, "mfgCode": null, "side": "server", "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "false", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "LastNetworkingStatus", + "code": 5, "mfgCode": null, "side": "server", - "type": "array", + "type": "NetworkCommissioningStatusEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2312,13 +2458,13 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "LastNetworkID", + "code": 6, "mfgCode": null, "side": "server", - "type": "array", + "type": "octet_string", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2328,13 +2474,13 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "LastConnectErrorValue", + "code": 7, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32s", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2353,7 +2499,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2375,40 +2521,47 @@ "maxInterval": 65344, "reportableChange": 0 } - ], - "events": [ - { - "name": "BootReason", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { - "name": "Software Diagnostics", - "code": 52, + "name": "Diagnostic Logs", + "code": 50, "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, "commands": [ { - "name": "ResetWatermarks", + "name": "RetrieveLogsRequest", "code": 0, "mfgCode": null, "source": "client", - "incoming": 0, - "outgoing": 1 + "incoming": 1, + "outgoing": 0 } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -2416,105 +2569,25 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Software Diagnostics", - "code": 52, + "name": "General Diagnostics", + "code": 51, "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, "attributes": [ - { - "name": "ThreadMetrics", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapFree", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapUsed", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapHighWatermark", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -2529,19 +2602,29 @@ ] }, { - "name": "Thread Network Diagnostics", - "code": 53, + "name": "General Diagnostics", + "code": 51, "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], "attributes": [ { - "name": "Channel", + "name": "NetworkInterfaces", "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -2553,103 +2636,103 @@ "reportableChange": 0 }, { - "name": "RoutingRole", + "name": "RebootCount", "code": 1, "mfgCode": null, "side": "server", - "type": "RoutingRoleEnum", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "NetworkName", + "name": "UpTime", "code": 2, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PanId", + "name": "TotalOperationalHours", "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x00000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ExtendedPanId", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MeshLocalPrefix", + "name": "ActiveHardwareFaults", "code": 5, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OverrunCount", + "name": "ActiveRadioFaults", "code": 6, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NeighborTable", + "name": "ActiveNetworkFaults", "code": 7, "mfgCode": null, "side": "server", @@ -2660,304 +2743,330 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RouteTable", + "name": "TestEventTriggersEnabled", "code": 8, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "false", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartitionId", - "code": 9, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Weighting", - "code": 10, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ], + "events": [ { - "name": "DataVersion", - "code": 11, + "name": "HardwareFaultChange", + "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "included": 1 }, { - "name": "StableDataVersion", - "code": 12, + "name": "RadioFaultChange", + "code": 1, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "included": 1 }, { - "name": "LeaderRouterId", - "code": 13, + "name": "NetworkFaultChange", + "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "included": 1 }, { - "name": "DetachedRoleCount", - "code": 14, + "name": "BootReason", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ { - "name": "ChildRoleCount", - "code": 15, + "name": "ResetWatermarks", + "code": 0, "mfgCode": null, - "side": "server", + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "RouterRoleCount", - "code": 16, + "name": "ThreadMetrics", + "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LeaderRoleCount", - "code": 17, + "name": "CurrentHeapFree", + "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttachAttemptCount", - "code": 18, + "name": "CurrentHeapUsed", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartitionIdChangeCount", - "code": 19, + "name": "CurrentHeapHighWatermark", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BetterPartitionAttachAttemptCount", - "code": 20, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ParentChangeCount", - "code": 21, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ { - "name": "TxTotalCount", - "code": 22, + "name": "ResetCounts", + "code": 0, "mfgCode": null, - "side": "server", - "type": "int32u", + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "TxUnicastCount", - "code": 23, + "name": "Channel", + "code": 0, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxBroadcastCount", - "code": 24, + "name": "RoutingRole", + "code": 1, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "RoutingRoleEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxAckRequestedCount", - "code": 25, + "name": "NetworkName", + "code": 2, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "char_string", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxAckedCount", - "code": 26, + "name": "PanId", + "code": 3, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2969,88 +3078,88 @@ "reportableChange": 0 }, { - "name": "TxNoAckRequestedCount", - "code": 27, + "name": "ExtendedPanId", + "code": 4, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxDataCount", - "code": 28, + "name": "MeshLocalPrefix", + "code": 5, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxDataPollCount", - "code": 29, + "name": "OverrunCount", + "code": 6, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxBeaconCount", - "code": 30, + "name": "NeighborTable", + "code": 7, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxBeaconRequestCount", - "code": 31, + "name": "RouteTable", + "code": 8, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxOtherCount", - "code": 32, + "name": "PartitionId", + "code": 9, "mfgCode": null, "side": "server", "type": "int32u", @@ -3058,82 +3167,82 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxRetryCount", - "code": 33, + "name": "Weighting", + "code": 10, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxDirectMaxRetryExpiryCount", - "code": 34, + "name": "DataVersion", + "code": 11, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxIndirectMaxRetryExpiryCount", - "code": 35, + "name": "StableDataVersion", + "code": 12, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxErrCcaCount", - "code": 36, + "name": "LeaderRouterId", + "code": 13, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxErrAbortCount", - "code": 37, + "name": "DetachedRoleCount", + "code": 14, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3145,11 +3254,11 @@ "reportableChange": 0 }, { - "name": "TxErrBusyChannelCount", - "code": 38, + "name": "ChildRoleCount", + "code": 15, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3161,11 +3270,11 @@ "reportableChange": 0 }, { - "name": "RxTotalCount", - "code": 39, + "name": "RouterRoleCount", + "code": 16, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3177,11 +3286,11 @@ "reportableChange": 0 }, { - "name": "RxUnicastCount", - "code": 40, + "name": "LeaderRoleCount", + "code": 17, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3193,11 +3302,11 @@ "reportableChange": 0 }, { - "name": "RxBroadcastCount", - "code": 41, + "name": "AttachAttemptCount", + "code": 18, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3209,11 +3318,11 @@ "reportableChange": 0 }, { - "name": "RxDataCount", - "code": 42, + "name": "PartitionIdChangeCount", + "code": 19, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3225,11 +3334,11 @@ "reportableChange": 0 }, { - "name": "RxDataPollCount", - "code": 43, + "name": "BetterPartitionAttachAttemptCount", + "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3241,11 +3350,11 @@ "reportableChange": 0 }, { - "name": "RxBeaconCount", - "code": 44, + "name": "ParentChangeCount", + "code": 21, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3257,8 +3366,8 @@ "reportableChange": 0 }, { - "name": "RxBeaconRequestCount", - "code": 45, + "name": "TxTotalCount", + "code": 22, "mfgCode": null, "side": "server", "type": "int32u", @@ -3273,8 +3382,8 @@ "reportableChange": 0 }, { - "name": "RxOtherCount", - "code": 46, + "name": "TxUnicastCount", + "code": 23, "mfgCode": null, "side": "server", "type": "int32u", @@ -3289,8 +3398,8 @@ "reportableChange": 0 }, { - "name": "RxAddressFilteredCount", - "code": 47, + "name": "TxBroadcastCount", + "code": 24, "mfgCode": null, "side": "server", "type": "int32u", @@ -3305,8 +3414,8 @@ "reportableChange": 0 }, { - "name": "RxDestAddrFilteredCount", - "code": 48, + "name": "TxAckRequestedCount", + "code": 25, "mfgCode": null, "side": "server", "type": "int32u", @@ -3321,8 +3430,8 @@ "reportableChange": 0 }, { - "name": "RxDuplicatedCount", - "code": 49, + "name": "TxAckedCount", + "code": 26, "mfgCode": null, "side": "server", "type": "int32u", @@ -3337,8 +3446,8 @@ "reportableChange": 0 }, { - "name": "RxErrNoFrameCount", - "code": 50, + "name": "TxNoAckRequestedCount", + "code": 27, "mfgCode": null, "side": "server", "type": "int32u", @@ -3353,8 +3462,8 @@ "reportableChange": 0 }, { - "name": "RxErrUnknownNeighborCount", - "code": 51, + "name": "TxDataCount", + "code": 28, "mfgCode": null, "side": "server", "type": "int32u", @@ -3369,8 +3478,8 @@ "reportableChange": 0 }, { - "name": "RxErrInvalidSrcAddrCount", - "code": 52, + "name": "TxDataPollCount", + "code": 29, "mfgCode": null, "side": "server", "type": "int32u", @@ -3385,8 +3494,8 @@ "reportableChange": 0 }, { - "name": "RxErrSecCount", - "code": 53, + "name": "TxBeaconCount", + "code": 30, "mfgCode": null, "side": "server", "type": "int32u", @@ -3401,8 +3510,8 @@ "reportableChange": 0 }, { - "name": "RxErrFcsCount", - "code": 54, + "name": "TxBeaconRequestCount", + "code": 31, "mfgCode": null, "side": "server", "type": "int32u", @@ -3417,8 +3526,8 @@ "reportableChange": 0 }, { - "name": "RxErrOtherCount", - "code": 55, + "name": "TxOtherCount", + "code": 32, "mfgCode": null, "side": "server", "type": "int32u", @@ -3433,40 +3542,40 @@ "reportableChange": 0 }, { - "name": "ActiveTimestamp", - "code": 56, + "name": "TxRetryCount", + "code": 33, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PendingTimestamp", - "code": 57, + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Delay", - "code": 58, + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, "mfgCode": null, "side": "server", "type": "int32u", @@ -3476,32 +3585,32 @@ "bounded": 0, "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SecurityPolicy", - "code": 59, + "name": "TxErrCcaCount", + "code": 36, "mfgCode": null, "side": "server", - "type": "SecurityPolicy", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ChannelPage0Mask", - "code": 60, + "name": "TxErrAbortCount", + "code": 37, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3513,159 +3622,139 @@ "reportableChange": 0 }, { - "name": "OperationalDatasetComponents", - "code": 61, + "name": "TxErrBusyChannelCount", + "code": 38, "mfgCode": null, "side": "server", - "type": "OperationalDatasetComponents", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ActiveNetworkFaultsList", - "code": 62, + "name": "RxTotalCount", + "code": 39, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "RxUnicastCount", + "code": 40, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "15", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "RxBroadcastCount", + "code": 41, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "RxDataCount", + "code": 42, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "BSSID", - "code": 0, + "name": "RxDataPollCount", + "code": 43, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SecurityType", - "code": 1, + "name": "RxBeaconCount", + "code": 44, "mfgCode": null, "side": "server", - "type": "SecurityTypeEnum", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "WiFiVersion", - "code": 2, + "name": "RxBeaconRequestCount", + "code": 45, "mfgCode": null, "side": "server", - "type": "WiFiVersionEnum", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ChannelNumber", - "code": 3, + "name": "RxOtherCount", + "code": 46, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3677,24 +3766,24 @@ "reportableChange": 0 }, { - "name": "RSSI", - "code": 4, + "name": "RxAddressFilteredCount", + "code": 47, "mfgCode": null, "side": "server", - "type": "int8s", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BeaconLostCount", - "code": 5, + "name": "RxDestAddrFilteredCount", + "code": 48, "mfgCode": null, "side": "server", "type": "int32u", @@ -3702,15 +3791,15 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BeaconRxCount", - "code": 6, + "name": "RxDuplicatedCount", + "code": 49, "mfgCode": null, "side": "server", "type": "int32u", @@ -3718,15 +3807,15 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketMulticastRxCount", - "code": 7, + "name": "RxErrNoFrameCount", + "code": 50, "mfgCode": null, "side": "server", "type": "int32u", @@ -3734,15 +3823,15 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketMulticastTxCount", - "code": 8, + "name": "RxErrUnknownNeighborCount", + "code": 51, "mfgCode": null, "side": "server", "type": "int32u", @@ -3750,15 +3839,15 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketUnicastRxCount", - "code": 9, + "name": "RxErrInvalidSrcAddrCount", + "code": 52, "mfgCode": null, "side": "server", "type": "int32u", @@ -3766,15 +3855,15 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketUnicastTxCount", - "code": 10, + "name": "RxErrSecCount", + "code": 53, "mfgCode": null, "side": "server", "type": "int32u", @@ -3782,15 +3871,47 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CurrentMaxRate", - "code": 11, + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, "mfgCode": null, "side": "server", "type": "int64u", @@ -3805,8 +3926,8 @@ "reportableChange": 0 }, { - "name": "OverrunCount", - "code": 12, + "name": "PendingTimestamp", + "code": 57, "mfgCode": null, "side": "server", "type": "int64u", @@ -3821,67 +3942,124 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "Delay", + "code": 58, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "SecurityPolicy", + "code": 59, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "SecurityPolicy", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ], - "events": [ + }, { - "name": "Disconnection", - "code": 0, + "name": "ChannelPage0Mask", + "code": 60, "mfgCode": null, "side": "server", - "included": 1 + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "AssociationFailure", - "code": 1, + "name": "OperationalDatasetComponents", + "code": 61, "mfgCode": null, "side": "server", - "included": 1 + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "ConnectionStatus", - "code": 2, + "name": "ActiveNetworkFaultsList", + "code": 62, "mfgCode": null, "side": "server", - "included": 1 + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 } ] }, { - "name": "Ethernet Network Diagnostics", - "code": 55, + "name": "WiFi Network Diagnostics", + "code": 54, "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -3891,7 +4069,7 @@ "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 + "outgoing": 0 } ], "attributes": [ @@ -3914,146 +4092,210 @@ ] }, { - "name": "Ethernet Network Diagnostics", - "code": 55, + "name": "WiFi Network Diagnostics", + "code": 54, "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "PHYRate", + "name": "BSSID", "code": 0, "mfgCode": null, "side": "server", - "type": "PHYRateEnum", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FullDuplex", + "name": "SecurityType", "code": 1, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketRxCount", + "name": "WiFiVersion", "code": 2, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketTxCount", + "name": "ChannelNumber", "code": 3, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxErrCount", + "name": "RSSI", "code": 4, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int8s", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CollisionCount", + "name": "BeaconLostCount", "code": 5, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x00000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OverrunCount", + "name": "BeaconRxCount", "code": 6, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x00000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CarrierDetect", + "name": "PacketMulticastRxCount", "code": 7, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x00000000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TimeSinceReset", + "name": "PacketMulticastTxCount", "code": 8, "mfgCode": null, "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", "type": "int64u", "included": 1, "storageOption": "External", @@ -4097,58 +4339,49 @@ "maxInterval": 65344, "reportableChange": 0 } - ] - }, - { - "name": "Administrator Commissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ + ], + "events": [ { - "name": "OpenCommissioningWindow", + "name": "Disconnection", "code": 0, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "included": 1 }, { - "name": "OpenBasicCommissioningWindow", + "name": "AssociationFailure", "code": 1, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "included": 1 }, { - "name": "RevokeCommissioning", + "name": "ConnectionStatus", "code": 2, "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, "source": "client", "incoming": 1, "outgoing": 1 } ], "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -4168,141 +4401,331 @@ ] }, { - "name": "Administrator Commissioning", - "code": 60, + "name": "Ethernet Network Diagnostics", + "code": 55, "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "WindowStatus", + "name": "PHYRate", "code": 0, "mfgCode": null, "side": "server", - "type": "CommissioningWindowStatusEnum", + "type": "PHYRateEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AdminFabricIndex", + "name": "FullDuplex", "code": 1, "mfgCode": null, "side": "server", - "type": "fabric_idx", + "type": "boolean", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x00", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AdminVendorId", + "name": "PacketRxCount", "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "PacketTxCount", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "TxErrCount", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "CollisionCount", + "code": 5, "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "OverrunCount", + "code": 6, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "TimeSinceReset", + "code": 8, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } ] }, { @@ -4379,22 +4802,6 @@ } ], "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -4551,54 +4958,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "FeatureMap", "code": 65532, @@ -4673,53 +5032,19 @@ "incoming": 1, "outgoing": 0 } - ], - "attributes": [ + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Group Key Management", - "code": 63, - "mfgCode": null, - "define": "GROUP_KEY_MANAGEMENT_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "KeySetReadResponse", - "code": 2, + "name": "KeySetReadResponse", + "code": 2, "mfgCode": null, "source": "server", "incoming": 0, @@ -4793,39 +5118,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4837,7 +5130,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -4895,7 +5188,7 @@ "mfgCode": null, "define": "FIXED_LABEL_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { "name": "LabelList", @@ -5012,13 +5305,113 @@ "reportableChange": 0 } ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] } ] }, { - "name": "Anonymous Endpoint Type", - "deviceTypeName": "MA-aggregator", - "deviceTypeCode": 14, + "name": "MA-doorlock", + "deviceTypeName": "MA-all-clusters-app", + "deviceTypeCode": 0, "deviceTypeProfileId": 259, "clusters": [ { @@ -5035,7 +5428,7 @@ "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { "name": "TriggerEffect", @@ -5073,10 +5466,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "4", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] @@ -5099,10 +5492,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -5153,6 +5546,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -5195,88 +5604,3063 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "4", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "Descriptor", - "code": 29, + "name": "Groups", + "code": 4, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "GROUPS_CLUSTER", "side": "client", "enabled": 0, - "attributes": [ + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "Battery", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredAssessedCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementDescription", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0A", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Smoke CO Alarm", + "code": 92, + "mfgCode": null, + "define": "SMOKE_CO_ALARM_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SelfTestRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Smoke CO Alarm", + "code": 92, + "mfgCode": null, + "define": "SMOKE_CO_ALARM_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ExpressedState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "ExpressedStateEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SmokeState", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "AlarmStateEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "COState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmStateEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatteryAlert", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "AlarmStateEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DeviceMuted", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "MuteStateEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestInProgress", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "HardwareFaultAlert", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndOfServiceAlert", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "EndOfServiceEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterconnectSmokeAlarm", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "AlarmStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterconnectCOAlarm", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "AlarmStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ContaminationState", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "ContaminationStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SensitivityLevel", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "SensitivityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "SmokeAlarm", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "COAlarm", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "LowBattery", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "HardwareFault", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "EndOfService", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "SelfTestComplete", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AlarmMuted", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "MuteEnded", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "InterconnectSmokeAlarm", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "InterconnectCOAlarm", + "code": 9, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AllClear", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockWithTimeout", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetWeekDaySchedule", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetWeekDaySchedule", + "code": 12, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ClearWeekDaySchedule", + "code": 13, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "SetYearDaySchedule", + "code": 14, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetYearDaySchedule", + "code": 15, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ClearYearDaySchedule", + "code": 16, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "SetHolidaySchedule", + "code": 17, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetHolidaySchedule", + "code": 18, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ClearHolidaySchedule", + "code": 19, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetCredentialStatus", + "code": 36, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "GetWeekDayScheduleResponse", + "code": 12, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetYearDayScheduleResponse", + "code": 15, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetHolidayScheduleResponse", + "code": 18, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetCredentialStatusResponse", + "code": 37, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "LockState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { - "name": "FeatureMap", - "code": 65532, + "name": "LockType", + "code": 1, "mfgCode": null, - "side": "client", - "type": "bitmap32", + "side": "server", + "type": "DlLockType", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "ActuatorEnabled", + "code": 2, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "DeviceTypeList", - "code": 0, + "name": "DoorState", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "DoorStateEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ServerList", - "code": 1, + "name": "DoorOpenEvents", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "int32u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5286,13 +8670,13 @@ "reportableChange": 0 }, { - "name": "ClientList", - "code": 2, + "name": "DoorClosedEvents", + "code": 5, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "int32u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5302,13 +8686,13 @@ "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "OpenPeriod", + "code": 6, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "int16u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5318,260 +8702,220 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "NumberOfTotalUsersSupported", + "code": 17, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "10", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "NumberOfPINUsersSupported", + "code": 18, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "10", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "NumberOfRFIDUsersSupported", + "code": 19, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "10", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "NumberOfWeekDaySchedulesSupportedPerUser", + "code": 20, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "10", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "NumberOfYearDaySchedulesSupportedPerUser", + "code": 21, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "10", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Binding", - "code": 30, - "mfgCode": null, - "define": "BINDING_CLUSTER", - "side": "client", - "enabled": 1, - "attributes": [ + }, { - "name": "FeatureMap", - "code": 65532, + "name": "NumberOfHolidaySchedulesSupported", + "code": 22, "mfgCode": null, - "side": "client", - "type": "bitmap32", + "side": "server", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "10", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "MaxPINCodeLength", + "code": 23, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "8", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Binding", - "code": 30, - "mfgCode": null, - "define": "BINDING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "Binding", - "code": 0, + "name": "MinPINCodeLength", + "code": 24, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "MaxRFIDCodeLength", + "code": 25, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "20", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "MinRFIDCodeLength", + "code": 26, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "10", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "CredentialRulesSupport", + "code": 27, "mfgCode": null, "side": "server", - "type": "array", + "type": "DlCredentialRuleMask", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "Language", + "code": 33, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "char_string", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "en", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Actions", - "code": 37, - "mfgCode": null, - "define": "ACTIONS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "InstantAction", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ + }, { - "name": "FeatureMap", - "code": 65532, + "name": "LEDSettings", + "code": 34, "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, + "side": "server", + "type": "int8u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -5582,379 +8926,323 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AutoRelockTime", + "code": 35, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "60", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Actions", - "code": 37, - "mfgCode": null, - "define": "ACTIONS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "ActionList", - "code": 0, + "name": "OperatingMode", + "code": 37, "mfgCode": null, "side": "server", - "type": "array", + "type": "OperatingModeEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "EndpointLists", - "code": 1, + "name": "SupportedOperatingModes", + "code": 38, "mfgCode": null, "side": "server", - "type": "array", + "type": "DlSupportedOperatingModes", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0xFFF6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SetupURL", - "code": 2, + "name": "DefaultConfigurationRegister", + "code": 39, "mfgCode": null, "side": "server", - "type": "long_char_string", - "included": 1, + "type": "DlDefaultConfigurationRegister", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "https://example.com", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "EnableLocalProgramming", + "code": 40, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "boolean", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "EnableOneTouchLocking", + "code": 41, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "EnableInsideStatusLED", + "code": 42, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "boolean", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "EnablePrivacyModeButton", + "code": 43, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "LocalProgrammingFeatures", + "code": 44, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "DlLocalProgrammingFeatures", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - } - ] - }, - { - "name": "MA-dimmablelight", - "deviceTypeName": "MA-dimmablelight", - "deviceTypeCode": 257, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "WrongCodeEntryLimit", + "code": 48, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "IdentifyTime", - "code": 0, + "name": "UserCodeTemporaryDisableTime", + "code": 49, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "10", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "SendPINOverTheAir", + "code": 50, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "boolean", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddGroup", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewGroup", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 }, { - "name": "GetGroupMembership", - "code": 2, + "name": "RequirePINforRemoteOperation", + "code": 51, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RemoveGroup", - "code": 3, + "name": "ExpiringUserTimeout", + "code": 53, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RemoveAllGroups", - "code": 4, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddGroupResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 }, { - "name": "ViewGroupResponse", - "code": 1, + "name": "EventList", + "code": 65530, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "GetGroupMembershipResponse", - "code": 2, + "name": "AttributeList", + "code": 65531, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RemoveGroupResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "NameSupport", - "code": 0, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "NameSupportBitmap", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0xDB3", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -5967,80 +9255,93 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ + ], + "events": [ { - "name": "AddScene", + "name": "DoorLockAlarm", "code": 0, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "included": 1 }, { - "name": "ViewScene", + "name": "DoorStateChange", "code": 1, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "included": 1 }, { - "name": "RemoveScene", + "name": "LockOperation", "code": 2, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "included": 1 }, { - "name": "RemoveAllScenes", + "name": "LockOperationError", "code": 3, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "included": 1 }, { - "name": "StoreScene", + "name": "LockUserChange", "code": 4, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ { - "name": "RecallScene", - "code": 5, + "name": "BarrierControlGoToPercent", + "code": 0, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "GetSceneMembership", - "code": 6, + "name": "BarrierControlStop", + "code": 1, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -6051,244 +9352,244 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Scenes", - "code": 5, + "name": "Barrier Control", + "code": 259, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "BARRIER_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, + "attributes": [ { - "name": "ViewSceneResponse", + "name": "barrier moving state", "code": 1, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RemoveSceneResponse", + "name": "barrier safety status", "code": 2, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RemoveAllScenesResponse", + "name": "barrier capabilities", "code": 3, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "StoreSceneResponse", + "name": "barrier open events", "code": 4, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "SceneCount", - "code": 0, + "name": "barrier close events", + "code": 5, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", + "type": "int16u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentScene", - "code": 1, + "name": "barrier command open events", + "code": 6, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, + "type": "int16u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentGroup", - "code": 2, + "name": "barrier command close events", + "code": 7, "mfgCode": null, "side": "server", - "type": "group_id", - "included": 1, + "type": "int16u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SceneValid", - "code": 3, + "name": "barrier open period", + "code": 8, "mfgCode": null, "side": "server", - "type": "boolean", - "included": 1, + "type": "int16u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NameSupport", - "code": 4, + "name": "barrier close period", + "code": 9, "mfgCode": null, "side": "server", - "type": "bitmap8", - "included": 1, + "type": "int16u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "barrier position", + "code": 10, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 }, { - "name": "On", - "code": 1, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "Toggle", - "code": 2, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "EventList", + "code": 65530, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "OnOff", - "code": 0, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -6317,88 +9618,152 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Level Control", - "code": 8, + "name": "Color Control", + "code": 768, "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", + "define": "COLOR_CONTROL_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "MoveToLevel", + "name": "MoveToHue", "code": 0, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "Move", + "name": "MoveHue", "code": 1, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "Step", + "name": "StepHue", "code": 2, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "Stop", + "name": "MoveToSaturation", "code": 3, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "MoveToLevelWithOnOff", + "name": "MoveSaturation", "code": 4, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "MoveWithOnOff", + "name": "StepSaturation", "code": 5, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "StepWithOnOff", + "name": "MoveToHueAndSaturation", "code": 6, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "StopWithOnOff", + "name": "MoveToColor", "code": 7, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -6411,86 +9776,86 @@ "bounded": 0, "defaultValue": "5", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Level Control", - "code": 8, + "name": "Color Control", + "code": 768, "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", + "define": "COLOR_CONTROL_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { - "name": "CurrentLevel", + "name": "CurrentHue", "code": 0, "mfgCode": null, "side": "server", "type": "int8u", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RemainingTime", + "name": "CurrentSaturation", "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, + "defaultValue": "0x00", + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MinLevel", + "name": "RemainingTime", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MaxLevel", + "name": "CurrentX", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFE", - "reportable": 1, + "defaultValue": "0x616B", + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentFrequency", + "name": "CurrentY", "code": 4, "mfgCode": null, "side": "server", @@ -6499,39 +9864,71 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, + "defaultValue": "0x607D", + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MinFrequency", + "name": "DriftCompensation", "code": 5, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "enum8", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MaxFrequency", + "name": "CompensationText", "code": 6, "mfgCode": null, "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x00FA", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6542,7 +9939,7 @@ "code": 15, "mfgCode": null, "side": "server", - "type": "LevelControlOptions", + "type": "bitmap8", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6554,39 +9951,39 @@ "reportableChange": 0 }, { - "name": "OnOffTransitionTime", + "name": "NumberOfPrimaries", "code": 16, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnLevel", + "name": "Primary1X", "code": 17, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFE", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnTransitionTime", + "name": "Primary1Y", "code": 18, "mfgCode": null, "side": "server", @@ -6602,11 +9999,11 @@ "reportableChange": 0 }, { - "name": "OffTransitionTime", + "name": "Primary1Intensity", "code": 19, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6618,11 +10015,11 @@ "reportableChange": 0 }, { - "name": "DefaultMoveRate", - "code": 20, + "name": "Primary2X", + "code": 21, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6634,40 +10031,40 @@ "reportableChange": 0 }, { - "name": "StartUpCurrentLevel", - "code": 16384, + "name": "Primary2Y", + "code": 22, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "255", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "Primary2Intensity", + "code": 23, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "Primary3X", + "code": 25, "mfgCode": null, "side": "server", "type": "int16u", @@ -6675,56 +10072,36 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "Primary3Y", + "code": 26, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "DeviceTypeList", - "code": 0, + "name": "Primary3Intensity", + "code": 27, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6734,13 +10111,13 @@ "reportableChange": 0 }, { - "name": "ServerList", - "code": 1, + "name": "Primary4X", + "code": 32, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6750,13 +10127,13 @@ "reportableChange": 0 }, { - "name": "ClientList", - "code": 2, + "name": "Primary4Y", + "code": 33, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6766,13 +10143,13 @@ "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "Primary4Intensity", + "code": 34, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6782,564 +10159,520 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "Primary5X", + "code": 36, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "Primary5Y", + "code": 37, "mfgCode": null, "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "Primary5Intensity", + "code": 38, "mfgCode": null, - "side": "client", + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6X", + "code": 40, + "mfgCode": null, + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "DataModelRevision", - "code": 0, + "name": "Primary6Y", + "code": 41, "mfgCode": null, "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "10", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "VendorName", - "code": 1, + "name": "Primary6Intensity", + "code": 42, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int8u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "VendorID", - "code": 2, + "name": "WhitePointX", + "code": 48, "mfgCode": null, "side": "server", - "type": "vendor_id", + "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductName", - "code": 3, + "name": "WhitePointY", + "code": 49, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductID", - "code": 4, + "name": "ColorPointRX", + "code": 50, "mfgCode": null, "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NodeLabel", - "code": 5, + "name": "ColorPointRY", + "code": 51, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, - "storageOption": "NVM", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Location", - "code": 6, + "name": "ColorPointRIntensity", + "code": 52, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int8u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "XX", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "HardwareVersion", - "code": 7, + "name": "ColorPointGX", + "code": 54, "mfgCode": null, "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "HardwareVersionString", - "code": 8, + "name": "ColorPointGY", + "code": 55, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SoftwareVersion", - "code": 9, + "name": "ColorPointGIntensity", + "code": 56, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int8u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SoftwareVersionString", - "code": 10, + "name": "ColorPointBX", + "code": 58, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ManufacturingDate", - "code": 11, + "name": "ColorPointBY", + "code": 59, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "20210614123456ZZ", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartNumber", - "code": 12, + "name": "ColorPointBIntensity", + "code": 60, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int8u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductURL", - "code": 13, + "name": "EnhancedCurrentHue", + "code": 16384, "mfgCode": null, "side": "server", - "type": "long_char_string", + "type": "int16u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductLabel", - "code": 14, + "name": "EnhancedColorMode", + "code": 16385, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "enum8", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x01", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SerialNumber", - "code": 15, + "name": "ColorLoopActive", + "code": 16386, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int8u", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LocalConfigDisabled", - "code": 16, + "name": "ColorLoopDirection", + "code": 16387, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int8u", "included": 1, - "storageOption": "NVM", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Reachable", - "code": 17, + "name": "ColorLoopTime", + "code": 16388, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0019", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UniqueID", - "code": 18, + "name": "ColorLoopStartEnhancedHue", + "code": 16389, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x2300", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CapabilityMinima", - "code": 19, + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, "mfgCode": null, "side": "server", - "type": "CapabilityMinimaStruct", - "included": 1, - "storageOption": "External", + "type": "int16u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "ColorCapabilities", + "code": 16394, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "bitmap16", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Switch", - "code": 59, - "mfgCode": null, - "define": "SWITCH_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "ColorTempPhysicalMinMireds", + "code": 16395, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Switch", - "code": 59, - "mfgCode": null, - "define": "SWITCH_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "NumberOfPositions", - "code": 0, + "name": "ColorTempPhysicalMaxMireds", + "code": 16396, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "0xFEFF", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentPosition", - "code": 1, + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MultiPressMax", - "code": 2, + "name": "StartUpColorTemperatureMireds", + "code": 16400, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "EventList", + "code": 65530, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "LabelList", - "code": 0, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -7349,8 +10682,8 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -7379,10 +10712,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -7435,7 +10768,7 @@ "mfgCode": null, "define": "TEMPERATURE_MEASUREMENT_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "MeasuredValue", @@ -7444,7 +10777,7 @@ "side": "server", "type": "int16s", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7460,10 +10793,10 @@ "side": "server", "type": "int16s", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x954D", + "defaultValue": "0x8000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7476,10 +10809,10 @@ "side": "server", "type": "int16s", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x7FFF", + "defaultValue": "0x8000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7533,6 +10866,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -7556,7 +10905,7 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7572,7 +10921,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7582,13 +10931,113 @@ "reportableChange": 0 } ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] } ] } ], "endpoints": [ { - "endpointTypeName": "MA-bridge", + "endpointTypeName": "MA-rootdevice", "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, @@ -7597,22 +11046,14 @@ "deviceIdentifier": 22 }, { - "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 14 - }, - { - "endpointTypeName": "MA-dimmablelight", - "endpointTypeIndex": 2, - "profileId": 259, - "endpointId": 2, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 + "deviceIdentifier": 0 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index a31d294fe8cee4..1a2aaab3ae031a 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -958,10 +970,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -973,7 +981,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index e6ede801cbf654..304de497411237 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1578,10 +1590,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1593,7 +1601,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only @@ -2054,7 +2062,7 @@ endpoint 1 { ram attribute sceneValid default = 0x00; ram attribute nameSupport; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; } server cluster Descriptor { diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 4c0a924e0de9ae..23fc81da772aa7 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -360,7 +360,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -516,7 +516,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7996,7 +7996,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8168,7 +8168,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/fragments/QrCodeFragment.java b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/fragments/QrCodeFragment.java index 04b17bd322e955..abd660bb8a57f1 100644 --- a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/fragments/QrCodeFragment.java +++ b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/fragments/QrCodeFragment.java @@ -9,9 +9,10 @@ import android.widget.SeekBar; import android.widget.TextView; import androidx.fragment.app.Fragment; -import chip.setuppayload.DiscoveryCapability; -import chip.setuppayload.SetupPayload; -import chip.setuppayload.SetupPayloadParser; +import chip.onboardingpayload.DiscoveryCapability; +import chip.onboardingpayload.OnboardingPayload; +import chip.onboardingpayload.OnboardingPayloadException; +import chip.onboardingpayload.OnboardingPayloadParser; import com.matter.tv.server.QRUtils; import com.matter.tv.server.R; import com.matter.tv.server.service.MatterServant; @@ -58,24 +59,24 @@ public void onResume() { // TODO: Get these parameters from PreferencesConfigurationManager HashSet discoveryCapabilities = new HashSet<>(); discoveryCapabilities.add(DiscoveryCapability.ON_NETWORK); - SetupPayload payload = - new SetupPayload(0, 9050, 65279, 0, discoveryCapabilities, 3840, 20202021); + OnboardingPayload payload = + new OnboardingPayload(0, 9050, 65279, 0, discoveryCapabilities, 3840, 20202021); - SetupPayloadParser parser = new SetupPayloadParser(); + OnboardingPayloadParser parser = new OnboardingPayloadParser(); try { String qrCode = parser.getQrCodeFromPayload(payload); mQrCodeTxt.setText(qrCode); Bitmap qrCodeBitmap = QRUtils.createQRCodeBitmap(qrCode, 800, 800); mQrCodeImg.setImageBitmap(qrCodeBitmap); - } catch (SetupPayloadParser.SetupPayloadException e) { + } catch (OnboardingPayloadException e) { e.printStackTrace(); } try { - String manualPairingCode = parser.getManualEntryCodeFromPayload(payload); + String manualPairingCode = parser.getManualPairingCodeFromPayload(payload); mManualPairingCodeTxt.setText("ManualPairingCode:" + manualPairingCode); - } catch (SetupPayloadParser.SetupPayloadException e) { + } catch (OnboardingPayloadException e) { e.printStackTrace(); } diff --git a/examples/tv-app/android/BUILD.gn b/examples/tv-app/android/BUILD.gn index b414dd4d593746..115d5dfb2a4cf0 100644 --- a/examples/tv-app/android/BUILD.gn +++ b/examples/tv-app/android/BUILD.gn @@ -164,7 +164,7 @@ group("default") { ":java", ":jni", "${chip_root}/src/app/server/java", + "${chip_root}/src/controller/java:onboarding_payload", "${chip_root}/src/platform/android:java", - "${chip_root}/src/setup_payload/java", ] } diff --git a/examples/tv-app/android/java/LevelManager.cpp b/examples/tv-app/android/java/LevelManager.cpp index 1be456903901b5..80ad32490ddb16 100644 --- a/examples/tv-app/android/java/LevelManager.cpp +++ b/examples/tv-app/android/java/LevelManager.cpp @@ -32,8 +32,9 @@ static constexpr size_t kLevelManagerTableSize = EMBER_AF_LEVEL_CONTROL_CLUSTER_ namespace { LevelManager * gLevelManagerTable[kLevelManagerTableSize] = { nullptr }; +static_assert(kLevelManagerTableSize <= kEmberInvalidEndpointIndex, "gLevelManagerTable table size error"); -} +} // namespace void emberAfLevelControlClusterInitCallback(EndpointId endpoint) { @@ -44,8 +45,9 @@ void emberAfLevelControlClusterInitCallback(EndpointId endpoint) void LevelManager::NewManager(jint endpoint, jobject manager) { ChipLogProgress(Zcl, "TV Android App: LevelManager::NewManager"); - uint16_t ep = emberAfFindClusterServerEndpointIndex(static_cast(endpoint), app::Clusters::LevelControl::Id); - VerifyOrReturn(ep != kEmberInvalidEndpointIndex && ep < kLevelManagerTableSize, + uint16_t ep = emberAfGetClusterServerEndpointIndex(static_cast(endpoint), app::Clusters::LevelControl::Id, + EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT); + VerifyOrReturn(ep < kLevelManagerTableSize, ChipLogError(Zcl, "TV Android App::Level::NewManager: endpoint %d not found", endpoint)); VerifyOrReturn(gLevelManagerTable[ep] == nullptr, @@ -65,8 +67,9 @@ void LevelManager::NewManager(jint endpoint, jobject manager) LevelManager * GetLevelManager(EndpointId endpoint) { - uint16_t ep = emberAfFindClusterServerEndpointIndex(endpoint, app::Clusters::LevelControl::Id); - return ((ep == kEmberInvalidEndpointIndex || ep >= kLevelManagerTableSize) ? nullptr : gLevelManagerTable[ep]); + uint16_t ep = emberAfGetClusterServerEndpointIndex(endpoint, app::Clusters::LevelControl::Id, + EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT); + return ((ep >= kLevelManagerTableSize) ? nullptr : gLevelManagerTable[ep]); } void LevelManager::PostLevelChanged(chip::EndpointId endpoint, uint8_t value) diff --git a/examples/tv-app/android/java/OnOffManager.cpp b/examples/tv-app/android/java/OnOffManager.cpp index 34cc33266717d2..822f058f647ef0 100644 --- a/examples/tv-app/android/java/OnOffManager.cpp +++ b/examples/tv-app/android/java/OnOffManager.cpp @@ -32,8 +32,9 @@ static constexpr size_t kOnffManagerTableSize = EMBER_AF_ON_OFF_CLUSTER_SERVER_E namespace { OnOffManager * gOnOffManagerTable[kOnffManagerTableSize] = { nullptr }; +static_assert(kOnffManagerTableSize <= kEmberInvalidEndpointIndex, "gOnOffManagerTable table size error"); -} +} // namespace void emberAfOnOffClusterInitCallback(EndpointId endpoint) { @@ -44,8 +45,9 @@ void emberAfOnOffClusterInitCallback(EndpointId endpoint) void OnOffManager::NewManager(jint endpoint, jobject manager) { ChipLogProgress(Zcl, "TV Android App: OnOffManager::NewManager"); - uint16_t ep = emberAfFindClusterServerEndpointIndex(static_cast(endpoint), app::Clusters::OnOff::Id); - VerifyOrReturn(ep != kEmberInvalidEndpointIndex && ep < EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT, + uint16_t ep = emberAfGetClusterServerEndpointIndex(static_cast(endpoint), app::Clusters::OnOff::Id, + EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT); + VerifyOrReturn(ep < kOnffManagerTableSize, ChipLogError(Zcl, "TV Android App::OnOff::NewManager: endpoint %d not found", endpoint)); VerifyOrReturn(gOnOffManagerTable[ep] == nullptr, @@ -65,10 +67,9 @@ void OnOffManager::NewManager(jint endpoint, jobject manager) OnOffManager * GetOnOffManager(EndpointId endpoint) { - uint16_t ep = emberAfFindClusterServerEndpointIndex(endpoint, app::Clusters::OnOff::Id); - return ((ep == kEmberInvalidEndpointIndex || ep >= EMBER_AF_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT) - ? nullptr - : gOnOffManagerTable[ep]); + uint16_t ep = + emberAfGetClusterServerEndpointIndex(endpoint, app::Clusters::OnOff::Id, EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT); + return (ep >= kOnffManagerTableSize ? nullptr : gOnOffManagerTable[ep]); } void OnOffManager::PostOnOffChanged(chip::EndpointId endpoint, bool value) diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index cdaa948be8c6e5..c60e578a902dfe 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1726,10 +1738,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1741,7 +1749,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index a07dce0879c8aa..30cb37f8806469 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -344,7 +344,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -500,7 +500,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 6601e6323b99c0..a2e66c29348bca 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1281,14 +1293,10 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 5de7d571d09350..086fe507a646e2 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -344,7 +344,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -500,7 +500,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7419,7 +7419,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7591,7 +7591,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 0044b60f094e5b..409aec2feb4ca6 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -1709,10 +1721,6 @@ server cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } @@ -1724,7 +1732,7 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only @@ -2260,7 +2268,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; } server cluster Descriptor { @@ -2337,7 +2345,7 @@ endpoint 2 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; } server cluster Descriptor { diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 192f5737fdd369..54f85ea113cbc5 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -496,7 +496,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -732,7 +732,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6714,7 +6714,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6950,7 +6950,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8250,7 +8250,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8486,7 +8486,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/window-app/nrfconnect/CMakeLists.txt b/examples/window-app/nrfconnect/CMakeLists.txt index 21bb4caeb6194b..441adc79b3ef95 100644 --- a/examples/window-app/nrfconnect/CMakeLists.txt +++ b/examples/window-app/nrfconnect/CMakeLists.txt @@ -66,11 +66,11 @@ chip_configure_data_model(app ZAP_FILE ${WIN_APP_COMMON_DIR}/window-app.zap ) -if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_SMP_BT) +if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/OTAUtil.cpp) endif() -if(CONFIG_MCUMGR_SMP_BT) +if(CONFIG_MCUMGR_TRANSPORT_BT) target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/DFUOverSMP.cpp) endif() diff --git a/examples/window-app/nrfconnect/main/AppTask.cpp b/examples/window-app/nrfconnect/main/AppTask.cpp index fca63e3176a409..38e20fd503d4ea 100644 --- a/examples/window-app/nrfconnect/main/AppTask.cpp +++ b/examples/window-app/nrfconnect/main/AppTask.cpp @@ -159,7 +159,7 @@ CHIP_ERROR AppTask::Init() k_timer_init(&sFunctionTimer, &AppTask::FunctionTimerTimeoutCallback, nullptr); k_timer_user_data_set(&sFunctionTimer, this); -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT // Initialize DFU over SMP GetDFUOverSMP().Init(); GetDFUOverSMP().ConfirmNewImage(); @@ -367,7 +367,7 @@ void AppTask::FunctionHandler(const AppEvent & event) { Instance().CancelTimer(); -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT GetDFUOverSMP().StartServer(); #else LOG_INF("Software update is disabled"); diff --git a/examples/window-app/nrfconnect/main/include/AppTask.h b/examples/window-app/nrfconnect/main/include/AppTask.h index 28a7331d9737ba..64410f910547a2 100644 --- a/examples/window-app/nrfconnect/main/include/AppTask.h +++ b/examples/window-app/nrfconnect/main/include/AppTask.h @@ -28,7 +28,7 @@ #include #endif -#ifdef CONFIG_MCUMGR_SMP_BT +#ifdef CONFIG_MCUMGR_TRANSPORT_BT #include "DFUOverSMP.h" #endif diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index fdc77e8a58aae1..892034895e8197 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -6,7 +6,7 @@ steps: - "--init" - "--recursive" id: Submodules - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -21,7 +21,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -84,7 +84,7 @@ steps: --target k32w-shell build --create-archives /workspace/artifacts/ - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -101,7 +101,6 @@ steps: --target linux-arm64-chip-tool-ipv6only-clang --target linux-arm64-chip-tool-nodeps --target linux-arm64-chip-tool-nodeps-ipv6only - --target linux-arm64-dynamic-bridge-ipv6only-clang --target linux-arm64-light-clang --target linux-arm64-light-ipv6only-clang --target linux-arm64-light-rpc-clang @@ -131,7 +130,6 @@ steps: --target linux-x64-chip-tool-coverage --target linux-x64-chip-tool-nodeps-ipv6only --target linux-x64-chip-tool-nodeps-ipv6only-minmdns-verbose - --target linux-x64-dynamic-bridge-ipv6only --target linux-x64-efr32-test-runner --target linux-x64-light-rpc-ipv6only --target linux-x64-light-rpc-ipv6only-minmdns-verbose diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 4db1c7afb05b2e..bde0b7aea6d481 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 2700s - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -26,7 +26,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 5c1d09c5f555ad..1134778bda2714 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" entrypoint: "bash" args: - "-c" @@ -22,7 +22,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -42,7 +42,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -63,7 +63,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -85,7 +85,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -99,7 +99,6 @@ steps: --target linux-arm64-bridge-ipv6only-clang --target linux-arm64-chip-tool-ipv6only-clang --target linux-arm64-chip-tool-nodeps-ipv6only - --target linux-arm64-dynamic-bridge-ipv6only-clang --target linux-arm64-light-clang-rpc-ipv6only --target linux-arm64-light-clang-rpc-ipv6only-minmdns-verbose --target linux-arm64-lock-ipv6only-clang @@ -109,8 +108,6 @@ steps: --target linux-arm64-python-bindings-clang --target linux-arm64-shell-ipv6only-clang --target linux-arm64-thermostat-ipv6only-clang - --target linux-arm64-tv-app-ipv6only-clang - --target linux-arm64-tv-casting-app-ipv6only-clang --target linux-x64-address-resolve-tool --target linux-x64-all-clusters-nodeps --target linux-x64-all-clusters-coverage @@ -119,22 +116,18 @@ steps: --target linux-x64-chip-tool-ipv6only --target linux-x64-chip-tool-ipv6only-minmdns-verbose --target linux-x64-contact-sensor-no-ble-with-ui - --target linux-x64-dynamic-bridge-ipv6only --target linux-x64-efr32-test-runner --target linux-x64-light-no-ble-with-ui --target linux-x64-light-rpc-ipv6only --target linux-x64-light-rpc-ipv6only-minmdns-verbose --target linux-x64-lock-ipv6only --target linux-x64-minmdns-ipv6only - --target linux-x64-minmdns-ipv6only-minmdns-verbose --target linux-x64-ota-provider-ipv6only --target linux-x64-ota-requestor-ipv6only --target linux-x64-python-bindings --target linux-x64-rpc-console --target linux-x64-shell-ipv6only --target linux-x64-thermostat-ipv6only - --target linux-x64-tv-app-ipv6only - --target linux-x64-tv-casting-app-ipv6only build --create-archives /workspace/artifacts/ waitFor: @@ -145,7 +138,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.7.3" + - name: "connectedhomeip/chip-build-vscode:0.7.16" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -166,7 +159,7 @@ steps: logsBucket: matter-build-automation-build-logs # Global timeout for all steps -timeout: 9000s +timeout: 14400s queueTtl: 21600s artifacts: diff --git a/integrations/docker/build.sh b/integrations/docker/build.sh index 8336b2689caf95..fefbbadba32bd0 100755 --- a/integrations/docker/build.sh +++ b/integrations/docker/build.sh @@ -35,8 +35,10 @@ VERSION=${DOCKER_BUILD_VERSION:-$(sed 's/ .*//' version)} if [[ $OSTYPE == 'darwin'* ]]; then DOCKER_VOLUME_PATH=~/Library/Containers/com.docker.docker/Data/vms/0/ + TARGET_PLATFORM_TYPE="linux/arm64" else DOCKER_VOLUME_PATH=/var/lib/docker/ + TARGET_PLATFORM_TYPE="linux/amd64" fi [[ ${*/--help//} != "${*}" ]] && { @@ -82,7 +84,7 @@ if [[ ${*/--no-cache//} != "${*}" ]]; then fi [[ ${*/--skip-build//} != "${*}" ]] || { - docker build "${BUILD_ARGS[@]}" --build-arg VERSION="$VERSION" -t "$ORG/$IMAGE:$VERSION" . + docker build "${BUILD_ARGS[@]}" --build-arg TARGETPLATFORM="$TARGET_PLATFORM_TYPE" --build-arg VERSION="$VERSION" -t "$ORG/$IMAGE:$VERSION" . docker image prune --force } diff --git a/integrations/docker/images/chip-build/Dockerfile b/integrations/docker/images/chip-build/Dockerfile index b2ef5509ec1217..64550e8aeb12bd 100644 --- a/integrations/docker/images/chip-build/Dockerfile +++ b/integrations/docker/images/chip-build/Dockerfile @@ -3,6 +3,29 @@ FROM ubuntu:focal VOLUME "/var/source" +ARG TARGETPLATFORM + +# Ensure TARGETPLATFORM is set +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") \ + echo "Building for linux/amd64" \ + ;; \ + "linux/arm64") \ + echo "Building for linux/arm64" \ + ;; \ + *) \ + if [ -z "$TARGETPLATFORM" ] ;\ + then \ + echo "TARGETPLATFORM not defined! Please run from buildkit (buildx)." \ + && return 1 ;\ + else \ + echo "Unsupported platform ${TARGETPLATFORM}." \ + && return 1 ;\ + fi \ + ;; \ + esac + + # base build and check tools and libraries layer RUN set -x \ && apt-get update \ @@ -75,11 +98,21 @@ RUN set -x \ && : # last line # Cmake v3.23.1 -RUN set -x \ +ENV CMAKE_PLATFORM_VERSION= +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") CMAKE_PLATFORM_VERSION="x86_64";; \ + "linux/arm64") CMAKE_PLATFORM_VERSION="aarch64";; \ + *) \ + test -n "$TARGETPLATFORM" \ + echo "Unsupported platform ${TARGETPLATFORM}" \ + && return 1 ;\ + ;; \ + esac \ + && set -x \ && (cd /tmp \ - && wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-Linux-x86_64.sh \ - && sh cmake-3.23.1-Linux-x86_64.sh --exclude-subdir --prefix=/usr/local \ - && rm -rf cmake-3.23.1-Linux-x86_64.sh) \ + && wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-Linux-$CMAKE_PLATFORM_VERSION.sh \ + && sh cmake-3.23.1-Linux-$CMAKE_PLATFORM_VERSION.sh --exclude-subdir --prefix=/usr/local \ + && rm -rf cmake-3.23.1-Linux-$CMAKE_PLATFORM_VERSION.sh) \ && exec bash \ && : # last line @@ -165,16 +198,26 @@ RUN set -x \ # report false positives. This case is most prominent with glib-2.0, which has # a lot of threads-related APIs. ENV LD_LIBRARY_PATH_TSAN=/usr/lib/x86_64-linux-gnu-tsan -RUN set -x \ - && mkdir -p $LD_LIBRARY_PATH_TSAN \ - && export CCACHE_DISABLE=1 PYTHONDONTWRITEBYTECODE=1 \ - && GLIB_VERSION=$(pkg-config --modversion glib-2.0) \ - && git clone --depth=1 --branch=$GLIB_VERSION https://github.com/GNOME/glib.git \ - && CFLAGS="-O2 -g -fsanitize=thread" meson glib/build glib \ - && DESTDIR=../build-image ninja -C glib/build install \ - && mv glib/build-image/usr/local/lib/x86_64-linux-gnu/lib* $LD_LIBRARY_PATH_TSAN \ - && rm -rf glib \ - && : # last line +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") \ + set -x \ + && mkdir -p $LD_LIBRARY_PATH_TSAN \ + && export CCACHE_DISABLE=1 PYTHONDONTWRITEBYTECODE=1 \ + && GLIB_VERSION=$(pkg-config --modversion glib-2.0) \ + && git clone --depth=1 --branch=$GLIB_VERSION https://github.com/GNOME/glib.git \ + && CFLAGS="-O2 -g -fsanitize=thread" meson glib/build glib \ + && DESTDIR=../build-image ninja -C glib/build install \ + && mv glib/build-image/usr/local/lib/x86_64-linux-gnu/lib* $LD_LIBRARY_PATH_TSAN \ + && rm -rf glib \ + ;; \ + "linux/arm64") \ + echo "ARM64 unsupported with TSAN" \ + ;; \ + *) \ + echo "Unsupported platform ${TARGETPLATFORM}" \ + && return 1 ;\ + ;; \ + esac # NodeJS: install a newer version than what apt-get would read # This installs the latest LTS version of nodejs @@ -184,13 +227,23 @@ RUN set -x \ # # This is not a CHIP dependency directly, but used by CI ENV CHIP_NODE_VERSION=v16.13.2 -RUN set -x \ +ENV NODE_PLATFORM_VERSION= +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") NODE_PLATFORM_VERSION=x64;; \ + "linux/arm64") NODE_PLATFORM_VERSION=arm64;; \ + *) \ + test -n "$TARGETPLATFORM" \ + echo "Unsupported platform ${TARGETPLATFORM}" \ + && return 1 ;\ + ;; \ + esac \ + && set -x \ && mkdir node_js \ && cd node_js \ - && wget https://nodejs.org/dist/$CHIP_NODE_VERSION/node-$CHIP_NODE_VERSION-linux-x64.tar.xz \ - && tar xfvJ node-$CHIP_NODE_VERSION-linux-x64.tar.xz \ - && mv node-$CHIP_NODE_VERSION-linux-x64 /opt/ \ - && ln -s /opt/node-$CHIP_NODE_VERSION-linux-x64 /opt/node \ + && wget https://nodejs.org/dist/$CHIP_NODE_VERSION/node-$CHIP_NODE_VERSION-linux-$NODE_PLATFORM_VERSION.tar.xz \ + && tar xfvJ node-$CHIP_NODE_VERSION-linux-$NODE_PLATFORM_VERSION.tar.xz \ + && mv node-$CHIP_NODE_VERSION-linux-$NODE_PLATFORM_VERSION /opt/ \ + && ln -s /opt/node-$CHIP_NODE_VERSION-linux-$NODE_PLATFORM_VERSION /opt/node \ && ln -s /opt/node/bin/* /usr/bin \ && cd .. \ && rm -rf node_js \ diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index efe28d97ed5731..359ad5d0ec6c19 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.7.16 Version bump reason: [nrfconnect] Update nRF Connect SDK version. +0.7.17 Version bump reason: Enable ARM64 build diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 5104ced2d0fff7..d2024c46209733 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -64,14 +64,19 @@ def BuildHostFakeTarget(): TargetPart('tests', app=HostApp.TESTS), ]) - target.AppendModifier("mbedtls", crypto_library=HostCryptoLibrary.MBEDTLS).ExceptIfRe('-boringssl') - target.AppendModifier("boringssl", crypto_library=HostCryptoLibrary.BORINGSSL).ExceptIfRe('-mbedtls') + target.AppendModifier( + "mbedtls", crypto_library=HostCryptoLibrary.MBEDTLS).ExceptIfRe('-boringssl') + target.AppendModifier( + "boringssl", crypto_library=HostCryptoLibrary.BORINGSSL).ExceptIfRe('-mbedtls') target.AppendModifier("asan", use_asan=True).ExceptIfRe("-tsan") target.AppendModifier("tsan", use_tsan=True).ExceptIfRe("-asan") target.AppendModifier("ubsan", use_ubsan=True) - target.AppendModifier("libfuzzer", fuzzing_type=HostFuzzingType.LIB_FUZZER).OnlyIfRe("-clang").ExceptIfRe('-ossfuzz') - target.AppendModifier("ossfuzz", fuzzing_type=HostFuzzingType.OSS_FUZZ).OnlyIfRe("-clang").ExceptIfRe('-libfuzzer') - target.AppendModifier('coverage', use_coverage=True).OnlyIfRe('-(chip-tool|all-clusters)') + target.AppendModifier("libfuzzer", fuzzing_type=HostFuzzingType.LIB_FUZZER).OnlyIfRe( + "-clang").ExceptIfRe('-ossfuzz') + target.AppendModifier("ossfuzz", fuzzing_type=HostFuzzingType.OSS_FUZZ).OnlyIfRe( + "-clang").ExceptIfRe('-libfuzzer') + target.AppendModifier('coverage', use_coverage=True).OnlyIfRe( + '-(chip-tool|all-clusters)') target.AppendModifier('dmalloc', use_dmalloc=True) target.AppendModifier('clang', use_clang=True) @@ -80,7 +85,8 @@ def BuildHostFakeTarget(): def BuildHostTarget(): native_board_name = HostBoard.NATIVE.BoardName() - cross_compile = (HostBoard.NATIVE.PlatformName() == 'linux') and (native_board_name != HostBoard.ARM64.BoardName()) + cross_compile = (HostBoard.NATIVE.PlatformName() == 'linux') and ( + native_board_name != HostBoard.ARM64.BoardName()) target = BuildTarget(HostBoard.NATIVE.PlatformName(), HostBuilder) @@ -89,31 +95,36 @@ def BuildHostTarget(): ] if cross_compile: - board_parts.append(TargetPart('arm64', board=HostBoard.ARM64).OnlyIfRe('-(clang|nodeps)')) + board_parts.append(TargetPart( + 'arm64', board=HostBoard.ARM64).OnlyIfRe('-(clang|nodeps)')) target.AppendFixedTargets(board_parts) # Add all the applications app_parts = [ - TargetPart('rpc-console', app=HostApp.RPC_CONSOLE).OnlyIfRe(f'{native_board_name}-'), + TargetPart('rpc-console', + app=HostApp.RPC_CONSOLE).OnlyIfRe(f'{native_board_name}-'), TargetPart('all-clusters', app=HostApp.ALL_CLUSTERS), TargetPart('all-clusters-minimal', app=HostApp.ALL_CLUSTERS_MINIMAL), TargetPart('chip-tool', app=HostApp.CHIP_TOOL), TargetPart('thermostat', app=HostApp.THERMOSTAT), - TargetPart('java-matter-controller', app=HostApp.JAVA_MATTER_CONTROLLER), + TargetPart('java-matter-controller', + app=HostApp.JAVA_MATTER_CONTROLLER), TargetPart('minmdns', app=HostApp.MIN_MDNS), TargetPart('light', app=HostApp.LIGHT), TargetPart('lock', app=HostApp.LOCK), TargetPart('shell', app=HostApp.SHELL), TargetPart('ota-provider', app=HostApp.OTA_PROVIDER, enable_ble=False), - TargetPart('ota-requestor', app=HostApp.OTA_REQUESTOR, enable_ble=False), - TargetPart('simulated-app1', app=HostApp.SIMULATED_APP1, enable_ble=False), - TargetPart('simulated-app2', app=HostApp.SIMULATED_APP2, enable_ble=False), + TargetPart('ota-requestor', app=HostApp.OTA_REQUESTOR, + enable_ble=False), + TargetPart('simulated-app1', app=HostApp.SIMULATED_APP1, + enable_ble=False), + TargetPart('simulated-app2', app=HostApp.SIMULATED_APP2, + enable_ble=False), TargetPart('python-bindings', app=HostApp.PYTHON_BINDINGS), TargetPart('tv-app', app=HostApp.TV_APP), TargetPart('tv-casting-app', app=HostApp.TV_CASTING), TargetPart('bridge', app=HostApp.BRIDGE), - TargetPart('dynamic-bridge', app=HostApp.DYNAMIC_BRIDGE), TargetPart('tests', app=HostApp.TESTS), TargetPart('chip-cert', app=HostApp.CERT_TOOL), TargetPart('address-resolve-tool', app=HostApp.ADDRESS_RESOLVE), @@ -121,7 +132,8 @@ def BuildHostTarget(): ] if (HostBoard.NATIVE.PlatformName() == 'darwin'): - app_parts.append(TargetPart('darwin-framework-tool', app=HostApp.CHIP_TOOL_DARWIN)) + app_parts.append(TargetPart('darwin-framework-tool', + app=HostApp.CHIP_TOOL_DARWIN)) target.AppendFixedTargets(app_parts) @@ -131,20 +143,27 @@ def BuildHostTarget(): target.AppendModifier('platform-mdns', use_platform_mdns=True) target.AppendModifier('minmdns-verbose', minmdns_high_verbosity=True) target.AppendModifier('libnl', minmdns_address_policy="libnl") - target.AppendModifier('same-event-loop', separate_event_loop=False).OnlyIfRe('-(chip-tool|darwin-framework-tool)') - target.AppendModifier('no-interactive', interactive_mode=False).OnlyIfRe('-chip-tool') + target.AppendModifier( + 'same-event-loop', separate_event_loop=False).OnlyIfRe('-(chip-tool|darwin-framework-tool)') + target.AppendModifier( + 'no-interactive', interactive_mode=False).OnlyIfRe('-chip-tool') target.AppendModifier("ipv6only", enable_ipv4=False) target.AppendModifier("no-ble", enable_ble=False) target.AppendModifier("no-wifi", enable_wifi=False) target.AppendModifier("no-thread", enable_thread=False) - target.AppendModifier("mbedtls", crypto_library=HostCryptoLibrary.MBEDTLS).ExceptIfRe('-boringssl') - target.AppendModifier("boringssl", crypto_library=HostCryptoLibrary.BORINGSSL).ExceptIfRe('-mbedtls') + target.AppendModifier( + "mbedtls", crypto_library=HostCryptoLibrary.MBEDTLS).ExceptIfRe('-boringssl') + target.AppendModifier( + "boringssl", crypto_library=HostCryptoLibrary.BORINGSSL).ExceptIfRe('-mbedtls') target.AppendModifier("asan", use_asan=True).ExceptIfRe("-tsan") target.AppendModifier("tsan", use_tsan=True).ExceptIfRe("-asan") target.AppendModifier("ubsan", use_ubsan=True) - target.AppendModifier("libfuzzer", fuzzing_type=HostFuzzingType.LIB_FUZZER).OnlyIfRe("-clang").ExceptIfRe('-ossfuzz') - target.AppendModifier("ossfuzz", fuzzing_type=HostFuzzingType.OSS_FUZZ).OnlyIfRe("-clang").ExceptIfRe('-libfuzzer') - target.AppendModifier('coverage', use_coverage=True).OnlyIfRe('-(chip-tool|all-clusters)') + target.AppendModifier("libfuzzer", fuzzing_type=HostFuzzingType.LIB_FUZZER).OnlyIfRe( + "-clang").ExceptIfRe('-ossfuzz') + target.AppendModifier("ossfuzz", fuzzing_type=HostFuzzingType.OSS_FUZZ).OnlyIfRe( + "-clang").ExceptIfRe('-libfuzzer') + target.AppendModifier('coverage', use_coverage=True).OnlyIfRe( + '-(chip-tool|all-clusters)') target.AppendModifier('dmalloc', use_dmalloc=True) target.AppendModifier('clang', use_clang=True) target.AppendModifier('test', extra_tests=True) @@ -175,7 +194,8 @@ def BuildEsp32Target(): TargetPart('light', app=Esp32App.LIGHT), TargetPart('lock', app=Esp32App.LOCK), TargetPart('bridge', app=Esp32App.BRIDGE), - TargetPart('temperature-measurement', app=Esp32App.TEMPERATURE_MEASUREMENT), + TargetPart('temperature-measurement', + app=Esp32App.TEMPERATURE_MEASUREMENT), TargetPart('ota-requestor', app=Esp32App.OTA_REQUESTOR), TargetPart('tests', app=Esp32App.TESTS).OnlyIfRe('-qemu-'), ]) @@ -220,16 +240,21 @@ def BuildEfr32Target(): target.AppendModifier('shell', chip_build_libshell=True) target.AppendModifier('no_logging', chip_logging=False) target.AppendModifier('openthread_mtd', chip_openthread_ftd=False) - target.AppendModifier('enable_heap_monitoring', enable_heap_monitoring=True) + target.AppendModifier('enable_heap_monitoring', + enable_heap_monitoring=True) target.AppendModifier('no_openthread_cli', enable_openthread_cli=False) - target.AppendModifier('show_qr_code', show_qr_code=True).ExceptIfRe('-low-power') + target.AppendModifier( + 'show_qr_code', show_qr_code=True).ExceptIfRe('-low-power') target.AppendModifier('wifi', enable_wifi=True) target.AppendModifier('rs911x', enable_rs911x=True).OnlyIfRe('-wifi') target.AppendModifier('wf200', enable_wf200=True).OnlyIfRe('-wifi') target.AppendModifier('wifi_ipv4', enable_wifi_ipv4=True).OnlyIfRe('-wifi') - target.AppendModifier('additional_data_advertising', enable_additional_data_advertising=True) - target.AppendModifier('use_ot_lib', enable_ot_lib=True).ExceptIfRe('-(wifi|use_ot_coap_lib)') - target.AppendModifier('use_ot_coap_lib', enable_ot_coap_lib=True).ExceptIfRe('-(wifi|use_ot_lib)') + target.AppendModifier('additional_data_advertising', + enable_additional_data_advertising=True) + target.AppendModifier('use_ot_lib', enable_ot_lib=True).ExceptIfRe( + '-(wifi|use_ot_coap_lib)') + target.AppendModifier('use_ot_coap_lib', enable_ot_coap_lib=True).ExceptIfRe( + '-(wifi|use_ot_lib)') target.AppendModifier('no-version', no_version=True) return target @@ -239,7 +264,8 @@ def BuildNrfNativeTarget(): target = BuildTarget('nrf', NrfConnectBuilder) target.AppendFixedTargets([ - TargetPart('native-posix-64-tests', board=NrfBoard.NATIVE_POSIX_64, app=NrfApp.UNIT_TESTS), + TargetPart('native-posix-64-tests', + board=NrfBoard.NATIVE_POSIX_64, app=NrfApp.UNIT_TESTS), ]) return target @@ -282,10 +308,14 @@ def BuildAndroidTarget(): TargetPart('arm64', board=AndroidBoard.ARM64), TargetPart('x86', board=AndroidBoard.X86), TargetPart('x64', board=AndroidBoard.X64), - TargetPart('androidstudio-arm', board=AndroidBoard.AndroidStudio_ARM).OnlyIfRe('chip-tool'), - TargetPart('androidstudio-arm64', board=AndroidBoard.AndroidStudio_ARM64).OnlyIfRe('chip-tool'), - TargetPart('androidstudio-x86', board=AndroidBoard.AndroidStudio_X86).OnlyIfRe('chip-tool'), - TargetPart('androidstudio-x64', board=AndroidBoard.AndroidStudio_X64).OnlyIfRe('chip-tool'), + TargetPart('androidstudio-arm', + board=AndroidBoard.AndroidStudio_ARM).OnlyIfRe('chip-tool'), + TargetPart('androidstudio-arm64', + board=AndroidBoard.AndroidStudio_ARM64).OnlyIfRe('chip-tool'), + TargetPart('androidstudio-x86', + board=AndroidBoard.AndroidStudio_X86).OnlyIfRe('chip-tool'), + TargetPart('androidstudio-x64', + board=AndroidBoard.AndroidStudio_X64).OnlyIfRe('chip-tool'), ]) # apps @@ -294,7 +324,8 @@ def BuildAndroidTarget(): TargetPart('chip-test', app=AndroidApp.CHIP_TEST), TargetPart('tv-server', app=AndroidApp.TV_SERVER), TargetPart('tv-casting-app', app=AndroidApp.TV_CASTING_APP), - TargetPart('java-matter-controller', app=AndroidApp.JAVA_MATTER_CONTROLLER), + TargetPart('java-matter-controller', + app=AndroidApp.JAVA_MATTER_CONTROLLER), ]) # Modifiers @@ -322,9 +353,12 @@ def BuildMbedTarget(): ]) # Modifiers - target.AppendModifier('release', profile=MbedProfile.RELEASE).ExceptIfRe('-(develop|debug)') - target.AppendModifier('develop', profile=MbedProfile.DEVELOP).ExceptIfRe('-(release|debug)') - target.AppendModifier('debug', profile=MbedProfile.DEBUG).ExceptIfRe('-(release|develop)') + target.AppendModifier('release', profile=MbedProfile.RELEASE).ExceptIfRe( + '-(develop|debug)') + target.AppendModifier('develop', profile=MbedProfile.DEVELOP).ExceptIfRe( + '-(release|debug)') + target.AppendModifier('debug', profile=MbedProfile.DEBUG).ExceptIfRe( + '-(release|develop)') return target @@ -342,7 +376,8 @@ def BuildInfineonTarget(): TargetPart('lock', app=InfineonApp.LOCK), TargetPart('light', app=InfineonApp.LIGHT), TargetPart('all-clusters', app=InfineonApp.ALL_CLUSTERS), - TargetPart('all-clusters-minimal', app=InfineonApp.ALL_CLUSTERS_MINIMAL), + TargetPart('all-clusters-minimal', + app=InfineonApp.ALL_CLUSTERS_MINIMAL), ]) # modifiers @@ -411,7 +446,8 @@ def BuildK32WTarget(): target.AppendModifier(name="low-power", low_power=True).OnlyIfRe("-nologs") target.AppendModifier(name="nologs", disable_logs=True) target.AppendModifier(name="crypto-platform", crypto_platform=True) - target.AppendModifier(name="tokenizer", tokenizer=True).ExceptIfRe("-nologs") + target.AppendModifier( + name="tokenizer", tokenizer=True).ExceptIfRe("-nologs") return target @@ -448,7 +484,8 @@ def BuildCC13x4Target(): TargetPart('lighting', app=TIApp.LIGHTING), TargetPart('lock', app=TIApp.LOCK, openthread_ftd=True), TargetPart('pump', app=TIApp.PUMP, openthread_ftd=False), - TargetPart('pump-controller', app=TIApp.PUMP_CONTROLLER, openthread_ftd=False), + TargetPart('pump-controller', app=TIApp.PUMP_CONTROLLER, + openthread_ftd=False), ]) target.AppendModifier(name="mtd", openthread_ftd=False) @@ -537,12 +574,18 @@ def BuildBouffalolabTarget(): # Boards target.AppendFixedTargets([ - TargetPart('BL602-IoT-Matter-V1', board=BouffalolabBoard.BL602_IoT_Matter_V1, module_type="BL602"), - TargetPart('BL602-IOT-DVK-3S', board=BouffalolabBoard.BL602_IOT_DVK_3S, module_type="BL602"), - TargetPart('BL602-NIGHT-LIGHT', board=BouffalolabBoard.BL602_NIGHT_LIGHT, module_type="BL602"), - TargetPart('XT-ZB6-DevKit', board=BouffalolabBoard.XT_ZB6_DevKit, module_type="BL706C-22"), - TargetPart('BL706-IoT-DVK', board=BouffalolabBoard.BL706_IoT_DVK, module_type="BL706C-22"), - TargetPart('BL706-NIGHT-LIGHT', board=BouffalolabBoard.BL706_NIGHT_LIGHT, module_type="BL706C-22"), + TargetPart('BL602-IoT-Matter-V1', + board=BouffalolabBoard.BL602_IoT_Matter_V1, module_type="BL602"), + TargetPart('BL602-IOT-DVK-3S', + board=BouffalolabBoard.BL602_IOT_DVK_3S, module_type="BL602"), + TargetPart('BL602-NIGHT-LIGHT', + board=BouffalolabBoard.BL602_NIGHT_LIGHT, module_type="BL602"), + TargetPart('XT-ZB6-DevKit', board=BouffalolabBoard.XT_ZB6_DevKit, + module_type="BL706C-22"), + TargetPart('BL706-IoT-DVK', board=BouffalolabBoard.BL706_IoT_DVK, + module_type="BL706C-22"), + TargetPart('BL706-NIGHT-LIGHT', + board=BouffalolabBoard.BL706_NIGHT_LIGHT, module_type="BL706C-22"), ]) # Apps @@ -566,7 +609,8 @@ def BuildIMXTarget(): TargetPart('lighting-app', app=IMXApp.LIGHT), TargetPart('thermostat', app=IMXApp.THERMOSTAT), TargetPart('all-clusters-app', app=IMXApp.ALL_CLUSTERS), - TargetPart('all-clusters-minimal-app', app=IMXApp.ALL_CLUSTERS_MINIMAL), + TargetPart('all-clusters-minimal-app', + app=IMXApp.ALL_CLUSTERS_MINIMAL), TargetPart('ota-provider-app', app=IMXApp.OTA_PROVIDER), ]) @@ -577,7 +621,8 @@ def BuildIMXTarget(): def BuildMW320Target(): target = BuildTarget('mw320', MW320Builder) - target.AppendFixedTargets([TargetPart('all-clusters-app', app=MW320App.ALL_CLUSTERS)]) + target.AppendFixedTargets( + [TargetPart('all-clusters-app', app=MW320App.ALL_CLUSTERS)]) return target @@ -589,7 +634,8 @@ def BuildGenioTarget(): def BuildTelinkTarget(): target = BuildTarget('telink', TelinkBuilder) - target.AppendFixedTargets([TargetPart('tlsr9518adk80d', board=TelinkBoard.TLSR9518ADK80D)]) + target.AppendFixedTargets( + [TargetPart('tlsr9518adk80d', board=TelinkBoard.TLSR9518ADK80D)]) target.AppendFixedTargets([ TargetPart('all-clusters', app=TelinkApp.ALL_CLUSTERS), @@ -602,7 +648,8 @@ def BuildTelinkTarget(): TargetPart('ota-requestor', app=TelinkApp.OTA_REQUESTOR), TargetPart('pump', app=TelinkApp.PUMP), TargetPart('pump-controller', app=TelinkApp.PUMP_CONTROLLER), - TargetPart('temperature-measurement', app=TelinkApp.TEMPERATURE_MEASUREMENT), + TargetPart('temperature-measurement', + app=TelinkApp.TEMPERATURE_MEASUREMENT), TargetPart('thermostat', app=TelinkApp.THERMOSTAT), TargetPart('window-covering', app=TelinkApp.WINDOW_COVERING), ]) diff --git a/scripts/build/builders/android.py b/scripts/build/builders/android.py index 9fd778eac6c46a..bab58f3f8b7b6e 100644 --- a/scripts/build/builders/android.py +++ b/scripts/build/builders/android.py @@ -210,7 +210,7 @@ def copyToSrcAndroid(self): # If we unify the JNI libraries, libc++_shared.so may not be needed anymore, which could # be another path of resolving this inconsistency. for libName in [ - "libSetupPayloadParser.so", + "libOnboardingPayload.so", "libCHIPController.so", "libc++_shared.so", ]: @@ -226,7 +226,7 @@ def copyToSrcAndroid(self): jars = { "CHIPController.jar": "src/controller/java/CHIPController.jar", - "SetupPayloadParser.jar": "src/setup_payload/java/SetupPayloadParser.jar", + "OnboardingPayload.jar": "src/controller/java/OnboardingPayload.jar", "AndroidPlatform.jar": "src/platform/android/AndroidPlatform.jar", "libCHIPTlv.jar": "src/controller/java/libCHIPTlv.jar", } @@ -478,11 +478,11 @@ def _build(self): self.root, "examples/", self.app.ExampleName(), "android/App/app/libs" ) - libs = ["libSetupPayloadParser.so", + libs = ["libOnboardingPayload.so", "libc++_shared.so", "libTvApp.so"] jars = { - "SetupPayloadParser.jar": "third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar", + "OnboardingPayload.jar": "third_party/connectedhomeip/src/controller/java/OnboardingPayload.jar", "AndroidPlatform.jar": "third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar", "CHIPAppServer.jar": "third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar", "TvApp.jar": "TvApp.jar", @@ -535,18 +535,18 @@ def build_outputs(self): "AndroidPlatform.jar": os.path.join( self.output_dir, "lib", "src/platform/android/AndroidPlatform.jar" ), - "SetupPayloadParser.jar": os.path.join( + "OnboardingPayload.jar": os.path.join( self.output_dir, "lib", - "src/setup_payload/java/SetupPayloadParser.jar", + "src/controller/java/OnboardingPayload.jar", ), - "jni/%s/libSetupPayloadParser.so" + "jni/%s/libOnboardingPayload.so" % self.board.AbiName(): os.path.join( self.output_dir, "lib", "jni", self.board.AbiName(), - "libSetupPayloadParser.so", + "libOnboardingPayload.so", ), "jni/%s/libCHIPController.so" % self.board.AbiName(): os.path.join( diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 4ee845ea7fd969..80b86765877b3b 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -66,7 +66,6 @@ class HostApp(Enum): EFR32_TEST_RUNNER = auto() TV_CASTING = auto() BRIDGE = auto() - DYNAMIC_BRIDGE = auto() JAVA_MATTER_CONTROLLER = auto() CONTACT_SENSOR = auto() @@ -109,8 +108,6 @@ def ExamplePath(self): return 'tv-casting-app/linux' elif self == HostApp.BRIDGE: return 'bridge-app/linux' - elif self == HostApp.DYNAMIC_BRIDGE: - return 'dynamic-bridge-app/linux' elif self == HostApp.JAVA_MATTER_CONTROLLER: return 'java-matter-controller' elif self == HostApp.CONTACT_SENSOR: @@ -188,9 +185,6 @@ def OutputNames(self): elif self == HostApp.BRIDGE: yield 'chip-bridge-app' yield 'chip-bridge-app.map' - elif self == HostApp.DYNAMIC_BRIDGE: - yield 'dynamic-chip-bridge-app' - yield 'dynamic-chip-bridge-app.map' elif self == HostApp.JAVA_MATTER_CONTROLLER: yield 'java-matter-controller' yield 'java-matter-controller.map' diff --git a/scripts/build/builders/nrf.py b/scripts/build/builders/nrf.py index 6357a1e755fb3b..d699d60ebd0148 100644 --- a/scripts/build/builders/nrf.py +++ b/scripts/build/builders/nrf.py @@ -161,7 +161,7 @@ def generate(self): zephyr_base = os.environ['ZEPHYR_BASE'] nrfconnect_sdk = os.path.dirname(zephyr_base) zephyr_sdk_dir = os.environ.get('ZEPHYR_SDK_INSTALL_DIR') or os.path.join( - os.environ['NRF5_TOOLS_ROOT'], 'zephyr-sdk-0.15.2') + os.environ['NRF5_TOOLS_ROOT'], 'zephyr-sdk-0.16.0') # NRF builds will both try to change .west/config in nrfconnect and # overall perform a git fetch on that location diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index 5d462bfad9b35d..821e9a84f04bc7 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -10,7 +10,7 @@ efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,b esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only] genio-lighting-app linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang] -linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,dynamic-bridge,tests,chip-cert,address-resolve-tool,contact-sensor}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui] +linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,tests,chip-cert,address-resolve-tool,contact-sensor}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui] linux-x64-efr32-test-runner[-clang] imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release] infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage] 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 ebd98f24bf2ac8..6adfec53c647bf 100644 --- a/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt +++ b/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt @@ -19,7 +19,7 @@ ninja -C {out}/android-arm64-chip-tool # Prepare Native libs android-arm64-chip-tool mkdir -p {root}/examples/android/CHIPTool/app/libs/jniLibs/arm64-v8a -cp {out}/android-arm64-chip-tool/lib/jni/arm64-v8a/libSetupPayloadParser.so {root}/examples/android/CHIPTool/app/libs/jniLibs/arm64-v8a/libSetupPayloadParser.so +cp {out}/android-arm64-chip-tool/lib/jni/arm64-v8a/libOnboardingPayload.so {root}/examples/android/CHIPTool/app/libs/jniLibs/arm64-v8a/libOnboardingPayload.so cp {out}/android-arm64-chip-tool/lib/jni/arm64-v8a/libCHIPController.so {root}/examples/android/CHIPTool/app/libs/jniLibs/arm64-v8a/libCHIPController.so @@ -27,7 +27,7 @@ cp {out}/android-arm64-chip-tool/lib/jni/arm64-v8a/libc++_shared.so {root}/examp cp {out}/android-arm64-chip-tool/lib/src/controller/java/CHIPController.jar {root}/examples/android/CHIPTool/app/libs/CHIPController.jar -cp {out}/android-arm64-chip-tool/lib/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/android/CHIPTool/app/libs/SetupPayloadParser.jar +cp {out}/android-arm64-chip-tool/lib/src/controller/java/OnboardingPayload.jar {root}/examples/android/CHIPTool/app/libs/OnboardingPayload.jar cp {out}/android-arm64-chip-tool/lib/src/platform/android/AndroidPlatform.jar {root}/examples/android/CHIPTool/app/libs/AndroidPlatform.jar diff --git a/scripts/examples/nrfconnect_example.sh b/scripts/examples/nrfconnect_example.sh index 072ecada10a2db..db1c850ff5e9a9 100755 --- a/scripts/examples/nrfconnect_example.sh +++ b/scripts/examples/nrfconnect_example.sh @@ -44,7 +44,7 @@ source "../scripts/activate.sh" export ZEPHYR_TOOLCHAIN_VARIANT=zephyr if [[ -z "$ZEPHYR_SDK_INSTALL_DIR" && -n "$NRF5_TOOLS_ROOT" ]]; then - export ZEPHYR_SDK_INSTALL_DIR="$NRF5_TOOLS_ROOT"/zephyr-sdk-0.15.2 + export ZEPHYR_SDK_INSTALL_DIR="$NRF5_TOOLS_ROOT"/zephyr-sdk-0.16.0 fi # Set ccache base directory to improve the cache hit ratio diff --git a/scripts/lints/clang-format-version-matches.py b/scripts/lints/clang-format-version-matches.py deleted file mode 100755 index 09bf7eda7d8e15..00000000000000 --- a/scripts/lints/clang-format-version-matches.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import json -import os - -CHIP_ROOT_DIR = os.path.realpath( - os.path.join(os.path.dirname(__file__), '../..')) - - -def readClangRevision(jsonFileName): - with open(os.path.join(CHIP_ROOT_DIR, jsonFileName)) as file: - data = json.load(file) - - packages = data['packages'] - for package in packages: - if package['path'].startswith('fuchsia/third_party/clang/'): - return package['tags'] - - raise Exception('Could not find clang package in %s' % jsonFileName) - - -pigweed_revision = readClangRevision('third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/cipd_setup/pigweed.json') - -our_file = 'scripts/setup/clang.json' -our_revision = readClangRevision(our_file) - -if our_revision != pigweed_revision: - raise Exception('In %s, "%s" should be changed to "%s"' % (our_file, our_revision, pigweed_revision)) diff --git a/scripts/pregenerate/__init__.py b/scripts/pregenerate/__init__.py index 8cdf56719f28a6..53c1e658176b19 100644 --- a/scripts/pregenerate/__init__.py +++ b/scripts/pregenerate/__init__.py @@ -20,8 +20,7 @@ from typing import Iterator, List, Optional from .types import IdlFileType, InputIdlFile -from .using_codegen import (CodegenBridgePregenerator, CodegenCppAppPregenerator, CodegenJavaClassPregenerator, - CodegenJavaJNIPregenerator) +from .using_codegen import CodegenCppAppPregenerator, CodegenJavaClassPregenerator, CodegenJavaJNIPregenerator from .using_zap import ZapApplicationPregenerator @@ -92,7 +91,6 @@ def FindPregenerationTargets(sdk_root: str, external_roots: Optional[List[str]], generators = [ # Jinja-based codegen - CodegenBridgePregenerator(sdk_root), CodegenJavaJNIPregenerator(sdk_root), CodegenJavaClassPregenerator(sdk_root), CodegenCppAppPregenerator(sdk_root), diff --git a/scripts/pregenerate/using_codegen.py b/scripts/pregenerate/using_codegen.py index 13e5b71b388661..5d790d808d40b6 100644 --- a/scripts/pregenerate/using_codegen.py +++ b/scripts/pregenerate/using_codegen.py @@ -58,21 +58,6 @@ def Generate(self, output_root: str): self.runner.run(cmd) -class CodegenBridgePregenerator: - """Pregeneration logic for "bridge" codegen.py outputs""" - - def __init__(self, sdk_root): - self.sdk_root = sdk_root - - def Accept(self, idl: InputIdlFile): - # Bridge is highly specific, a single path is acceptable for dynamic - # bridge codegen - return idl.relative_path == "examples/dynamic-bridge-app/bridge-common/bridge-app.matter" - - def CreateTarget(self, idl: InputIdlFile, runner): - return CodegenTarget(sdk_root=self.sdk_root, idl=idl, generator="bridge", runner=runner) - - class CodegenJavaJNIPregenerator: """Pregeneration logic for "java" codegen.py outputs""" diff --git a/scripts/py_matter_idl/BUILD.gn b/scripts/py_matter_idl/BUILD.gn index 06bdb3da4a673b..bd1975afe3b4c0 100644 --- a/scripts/py_matter_idl/BUILD.gn +++ b/scripts/py_matter_idl/BUILD.gn @@ -38,21 +38,12 @@ pw_python_package("matter_idl") { "matter_idl/tests/inputs/optional_argument.matter", "matter_idl/tests/inputs/several_clusters.matter", "matter_idl/tests/inputs/simple_attribute.matter", - "matter_idl/tests/outputs/cluster_struct_attribute/bridge/BridgeClustersImpl.h", - "matter_idl/tests/outputs/cluster_struct_attribute/bridge/DemoClusterServer.h", "matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp", "matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp", - "matter_idl/tests/outputs/global_struct_attribute/bridge/BridgeClustersImpl.h", - "matter_idl/tests/outputs/global_struct_attribute/bridge/DemoClusterServer.h", "matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp", "matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp", "matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-ReadImpl.cpp", "matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp", - "matter_idl/tests/outputs/several_clusters/bridge/BridgeClustersImpl.h", - "matter_idl/tests/outputs/several_clusters/bridge/FirstServer.h", - "matter_idl/tests/outputs/several_clusters/bridge/SecondServer.h", - "matter_idl/tests/outputs/several_clusters/bridge/Third.h", - "matter_idl/tests/outputs/several_clusters/bridge/ThirdServer.h", "matter_idl/tests/outputs/several_clusters/java/ClusterIDMapping.java", "matter_idl/tests/outputs/several_clusters/java/ClusterWriteMapping.java", "matter_idl/tests/outputs/several_clusters/jni/FirstClient-ReadImpl.cpp", @@ -61,8 +52,6 @@ pw_python_package("matter_idl") { "matter_idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp", "matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp", "matter_idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp", - "matter_idl/tests/outputs/simple_attribute/bridge/BridgeClustersImpl.h", - "matter_idl/tests/outputs/simple_attribute/bridge/MyClusterServer.h", "matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-ReadImpl.cpp", "matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp", ] diff --git a/scripts/py_matter_idl/files.gni b/scripts/py_matter_idl/files.gni index 986b1953377b43..0118c1aa7a3909 100644 --- a/scripts/py_matter_idl/files.gni +++ b/scripts/py_matter_idl/files.gni @@ -3,9 +3,6 @@ import("//build_overrides/chip.gni") # Templates used for generation matter_idl_generator_templates = [ - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCpp.jinja", - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCommon.jinja", - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersGlobalStructs.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/ClusterWriteMapping.jinja", @@ -17,7 +14,6 @@ matter_idl_generator_templates = [ matter_idl_generator_sources = [ "${chip_root}/scripts/py_matter_idl/matter_idl/__init__.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/__init__.py", - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/cpp/__init__.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/cpp/application/__init__.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/filters.py", diff --git a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCommon.jinja b/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCommon.jinja deleted file mode 100644 index 9313cb4dffbba7..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCommon.jinja +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include - -{%- for cluster in clusters %} -{%- if cluster | dynamicCluster(idl) %} -#include "bridge/{{cluster.name}}.h" -{%- endif %} -{%- endfor %} - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { -{% for cluster in clusters %} -{%- if cluster | dynamicCluster(idl) %} - { - {{cluster.code}}, - "{{cluster.name}}", - sizeof({{cluster.name}}Cluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) {{cluster.name}}Cluster(); - }, - }, -{%- endif %} -{%- endfor %} -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCpp.jinja b/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCpp.jinja deleted file mode 100644 index 4a6514bed3e421..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCpp.jinja +++ /dev/null @@ -1,86 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct {{cluster.name}}Cluster : public GeneratedCluster -{ - {%- for struct in cluster.structs %} - {%- if struct.tag == None %} - struct {{struct.name}} - { - CHIP_ERROR Decode(chip::TLV::TLVReader & reader) - { - chip::app::Clusters::{{cluster.name}}::Structs::{{struct.name}}::DecodableType t; - CHIP_ERROR err = t.Decode(reader); - if(err == CHIP_NO_ERROR) { - {%- for field in struct.fields %} - {{field.name}} = t.{{field.name}}; - {%- endfor %} - } - return err; - } - - CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const - { - chip::app::Clusters::{{cluster.name}}::Structs::{{struct.name}}::Type t; - {%- for field in struct.fields %} - t.{{field.name}} = {{field.name}}; - {%- endfor %} - return t.Encode(writer, tag); - } - - static constexpr bool kIsFabricScoped = false; - - {%- for field in struct.fields %} - {{field | getField(cluster, idl)}} {{field.name}}; - {%- endfor %} - }; - {%- endif %} - {%- endfor %} - - {{cluster.name}}Cluster() : - {%- for attr in cluster.attributes %} - m{{attr.definition.name | capitalcase}}(chip::CharSpan("{{attr.definition.name}}"), {{attr.definition.code}}, {{attr | getMask(cluster, idl)}} | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), {{attr | getRawSizeAndType(cluster, idl)}}{{attr | getInit(cluster, idl)}}){{"," if not loop.last}} - {%- endfor %} - { - } - - static constexpr uint32_t kClusterId ={{cluster.code}}; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - {%- for attr in cluster.attributes %} - static_cast(&m{{attr.definition.name | capitalcase}}), - {%- endfor %} - }); - } - -{% for attr in cluster.attributes %} - {{"List" if attr.definition.is_list}}Attribute<{{attr | getType(cluster, idl)}}> m{{attr.definition.name | capitalcase}}; -{%- endfor %} - -{%- if cluster.commands | length > 0 %} - static const chip::CommandId mIncomingCommandList[]; - const chip::CommandId * GetIncomingCommandList() override - { - return mIncomingCommandList; - } -{%- endif %} -}; - -{%- if cluster.commands | length > 0 %} -#ifndef {{cluster.name | constcase}}_CLUSTER_INCOMING_COMMANDS -#define {{cluster.name | constcase}}_CLUSTER_INCOMING_COMMANDS -const chip::CommandId {{cluster.name}}Cluster::mIncomingCommandList[] = { -{%- for command in cluster.commands %} - {{command.code}}, -{%- endfor %} - chip::kInvalidCommandId -}; -#endif -{%- endif %} - -} diff --git a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersGlobalStructs.jinja b/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersGlobalStructs.jinja deleted file mode 100644 index 548f8af5fc71e7..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersGlobalStructs.jinja +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include -#include - -#include -#include - -namespace clusters { - -{% for struct in structs %} -struct {{struct.name}} -{ - CHIP_ERROR Decode(chip::TLV::TLVReader & reader) - { - chip::app::Clusters::detail::Structs::{{struct.name}}::DecodableType t; - CHIP_ERROR err = t.Decode(reader); - if(err == CHIP_NO_ERROR) { - {%- for field in struct.fields %} - chip::Value::Assign({{field.name}}, t.{{field.name}}); - {%- endfor %} - } - return err; - } - - CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const - { - chip::app::Clusters::detail::Structs::{{struct.name}}::Type t; - {%- for field in struct.fields %} - chip::Value::Assign(t.{{field.name}}, {{field.name}}); - {%- endfor %} - return t.Encode(writer, tag); - } - - {%- for field in struct.fields %} - {{field | getField(None, idl)}} {{field.name}}; - {%- endfor %} -}; -{%- endfor %} - -} diff --git a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersHeader.jinja b/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersHeader.jinja deleted file mode 100644 index 452cdb845916a6..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersHeader.jinja +++ /dev/null @@ -1,62 +0,0 @@ -#include - -namespace clusters { - -{%- for cluster in clusters %} -{%- if cluster | dynamicCluster(idl) %} -struct {{cluster.name}}Cluster : public CommonCluster -{ - {%- for struct in cluster.structs %} - {%- if struct.tag == None %} - struct {{struct.name}} - { - CHIP_ERROR Decode(chip::TLV::TLVReader & reader); - CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const; - - {%- for field in struct.fields %} - {{field | getField(cluster, idl)}} {{field.name}}; - {%- endfor %} - }; - {%- endif %} - {%- endfor %} - - static constexpr chip::ClusterId kClusterId = {{cluster.code}}; - - chip::ClusterId GetClusterId() override { return kClusterId; } - - CHIP_ERROR WriteFromBridge(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - - template - void AddAllAttributes(T *list) - { - {%- for attr in cluster.attributes %} - list->Add(m{{attr.definition.name | capitalcase}}); - {%- endfor %} - } - - chip::Span GetAllAttributes() override; - -{% for attr in cluster.attributes %} - Attribute<{{attr.definition.code}}, {{attr | getMask(cluster, idl)}}, {{attr | getType(cluster, idl)}}> m{{attr.definition.name | capitalcase}}{{attr | getInit(cluster, idl)}}; -{%- endfor %} -}; - -struct {{cluster.name}}Access : public CommonAttributeAccessInterface -{ - {{cluster.name}}Access(); - - {{cluster.name}}Cluster* GetCluster(const chip::app::ConcreteClusterPath & aPath) - { - CommonCluster * cluster = FindCluster(aPath); - return cluster ? static_cast<{{cluster.name}}Cluster*>(cluster) : nullptr; - } - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - void OnListWriteBegin(const chip::app::ConcreteAttributePath & aPath) override; - void OnListWriteEnd(const chip::app::ConcreteAttributePath & aPath, bool aWriteWasSuccessful) override; -}; -{%- endif %} -{%- endfor %} - -} diff --git a/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py b/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py deleted file mode 100644 index ef6f812de35def..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py +++ /dev/null @@ -1,181 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -import re -from typing import Tuple, Union - -from matter_idl.generators import CodeGenerator, GeneratorStorage -from matter_idl.generators.types import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType, - ParseDataType, TypeLookupContext) -from matter_idl.matter_idl_types import Attribute, Cluster, ClusterSide, Field, Idl - - -def camel_to_const(s): - return re.sub("([a-z])([A-Z])", lambda y: y.group(1) + "_" + y.group(2), s).upper() - - -def create_lookup_context(idl: Idl, cluster: Cluster) -> TypeLookupContext: - """ - A filter to mark a lookup context to be within a specific cluster. - - This is used to specify how structure/enum/other names are looked up. - Generally one looks up within the specific cluster then if cluster does - not contain a definition, we loop at global namespacing. - """ - return TypeLookupContext(idl, cluster) - - -def get_field_info(definition: Field, cluster: Cluster, idl: Idl) -> Tuple[str, str, Union[str, int, None], str]: - context = create_lookup_context(idl, cluster) - actual = ParseDataType(definition.data_type, context) - - if isinstance(actual, (IdlEnumType, IdlBitmapType)): - actual = actual.base_type - - if isinstance(actual, BasicString): - return 'OctetString', 'char', actual.max_length, \ - 'ZCL_%s_ATTRIBUTE_TYPE' % actual.idl_name.upper() - - if isinstance(actual, BasicInteger): - name = actual.idl_name.upper() - ty = "int%d_t" % actual.power_of_two_bits - if not actual.is_signed: - ty = "u" + ty - return "", ty, actual.byte_count, "ZCL_%s_ATTRIBUTE_TYPE" % name - if isinstance(actual, FundamentalType): - if actual == FundamentalType.BOOL: - return "", "bool", 1, "ZCL_BOOLEAN_ATTRIBUTE_TYPE" - elif actual == FundamentalType.FLOAT: - return "", "float", 4, "ZCL_SINGLE_ATTRIBUTE_TYPE" - elif actual == FundamentalType.DOUBLE: - return "", "double", 8, "ZCL_DOUBLE_ATTRIBUTE_TYPE" - else: - raise Exception('Unknown fundamental type: %r' % actual) - if isinstance(actual, IdlType): - return '', actual.idl_name, 'sizeof(%s)' % actual.idl_name, \ - 'ZCL_STRUCT_ATTRIBUTE_TYPE' - raise Exception('UNKNOWN TYPE: %s' % actual) - - -def get_raw_size_and_type(attr: Attribute, cluster: Cluster, idl: Idl) -> str: - container, cType, size, matterType = get_field_info( - attr.definition, cluster, idl) - if attr.definition.is_list: - return 'ZCL_ARRAY_ATTRIBUTE_TYPE, {}'.format(size) - return '{}, {}'.format(matterType, size) - - -def get_field_type(definition: Field, cluster: Cluster, idl: Idl): - container, cType, size, matterType = get_field_info( - definition, cluster, idl) - if container == 'OctetString': - return 'std::string' - if definition.is_list: - cType = 'std::vector<{}>'.format(cType) - if definition.is_nullable: - cType = '::chip::app::DataModel::Nullable<{}>'.format(cType) - if definition.is_optional: - cType = '::chip::Optional<{}>'.format(cType) - return cType - - -def get_attr_type(attr: Attribute, cluster: Cluster, idl: Idl): - return get_field_type(attr.definition, cluster, idl) - - -def get_attr_init(attr: Attribute, cluster: Cluster, idl: Idl): - if attr.definition.name == 'clusterRevision': - return ', ZCL_' + camel_to_const(cluster.name) + '_CLUSTER_REVISION' - return '' - - -def get_attr_mask(attr: Attribute, cluster: Cluster, idl: Idl): - masks = [] - if attr.is_writable: - masks.append('ATTRIBUTE_MASK_WRITABLE') - if masks: - return ' | '.join(masks) - return '0' - - -def get_dynamic_endpoint(idl: Idl): - for ep in idl.endpoints: - if ep.number == 2: - return ep - - -def is_dynamic_cluster(cluster: Cluster, idl: Idl): - ep = get_dynamic_endpoint(idl) - if not ep: - return True - for c in ep.server_clusters: - if cluster.name == c.name: - return True - return False - - -class BridgeGenerator(CodeGenerator): - """ - Generation of bridge cpp code for matter. - """ - - def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs): - """ - Inintialization is specific for cpp generation and will add - filters as required by the cpp .jinja templates to function. - """ - super().__init__(storage, idl, fs_loader_searchpath=os.path.dirname(__file__)) - - self.jinja_env.filters['getType'] = get_attr_type - self.jinja_env.filters['getRawSizeAndType'] = get_raw_size_and_type - self.jinja_env.filters['getField'] = get_field_type - self.jinja_env.filters['getMask'] = get_attr_mask - self.jinja_env.filters['getInit'] = get_attr_init - self.jinja_env.filters['dynamicCluster'] = is_dynamic_cluster - # constcase will transform ID to I_D which is not what we want - # instead make the requirement a transition from lower to upper - self.jinja_env.filters['cameltoconst'] = camel_to_const - - def internal_render_all(self): - """ - Renders C++ - """ - for cluster in self.idl.clusters: - if not is_dynamic_cluster(cluster, self.idl): - continue - - if cluster.side != ClusterSide.SERVER: - output_file_name = "bridge/%sServer.h" % cluster.name - else: - output_file_name = "bridge/%s.h" % cluster.name - - self.internal_render_one_output( - template_path="BridgeClustersCpp.jinja", - output_file_name=output_file_name, - vars={ - 'cluster': cluster, - 'idl': self.idl, - } - ) - - self.internal_render_one_output( - template_path="BridgeClustersCommon.jinja", - output_file_name="bridge/BridgeClustersImpl.h", - vars={ - 'clusters': self.idl.clusters, - 'idl': self.idl, - } - ) diff --git a/scripts/py_matter_idl/matter_idl/generators/registry.py b/scripts/py_matter_idl/matter_idl/generators/registry.py index 8caf84c8fded9f..7f1e17bc4d05a7 100644 --- a/scripts/py_matter_idl/matter_idl/generators/registry.py +++ b/scripts/py_matter_idl/matter_idl/generators/registry.py @@ -15,7 +15,6 @@ import enum import importlib -from matter_idl.generators.bridge import BridgeGenerator from matter_idl.generators.cpp.application import CppApplicationGenerator from matter_idl.generators.java import JavaClassGenerator, JavaJNIGenerator @@ -28,7 +27,6 @@ class CodeGenerator(enum.Enum): """ JAVA_JNI = enum.auto() JAVA_CLASS = enum.auto() - BRIDGE = enum.auto() CPP_APPLICATION = enum.auto() CUSTOM = enum.auto() @@ -37,8 +35,6 @@ def Create(self, *args, **kargs): return JavaJNIGenerator(*args, **kargs) elif self == CodeGenerator.JAVA_CLASS: return JavaClassGenerator(*args, **kargs) - elif self == CodeGenerator.BRIDGE: - return BridgeGenerator(*args, **kargs) elif self == CodeGenerator.CPP_APPLICATION: return CppApplicationGenerator(*args, **kargs) elif self == CodeGenerator.CUSTOM: @@ -68,7 +64,6 @@ def FromString(name): GENERATORS = { 'java-jni': CodeGenerator.JAVA_JNI, 'java-class': CodeGenerator.JAVA_CLASS, - 'bridge': CodeGenerator.BRIDGE, 'cpp-app': CodeGenerator.CPP_APPLICATION, 'custom': CodeGenerator.CUSTOM, } diff --git a/scripts/py_matter_idl/matter_idl/lint/lint_rules_grammar.lark b/scripts/py_matter_idl/matter_idl/lint/lint_rules_grammar.lark index 55a0b61a32994c..90cfd6e8d441f7 100644 --- a/scripts/py_matter_idl/matter_idl/lint/lint_rules_grammar.lark +++ b/scripts/py_matter_idl/matter_idl/lint/lint_rules_grammar.lark @@ -6,12 +6,14 @@ load_xml: "load" ESCAPED_STRING ";" all_endpoint_rule: "all" "endpoints" "{" required_global_attribute* "}" -specific_endpoint_rule: "endpoint" integer "{" required_server_cluster* "}" +specific_endpoint_rule: "endpoint" integer "{" (required_server_cluster|rejected_server_cluster)* "}" required_global_attribute: "require" "global" "attribute" id "=" integer ";" required_server_cluster: "require" "server" "cluster" (id|POSITIVE_INTEGER|HEX_INTEGER) ";" +rejected_server_cluster: "reject" "server" "cluster" (id|POSITIVE_INTEGER|HEX_INTEGER) ";" + integer: positive_integer | negative_integer positive_integer: POSITIVE_INTEGER | HEX_INTEGER diff --git a/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py b/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py index f3b2c6dabdf620..81a6158f13f542 100755 --- a/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py +++ b/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py @@ -4,21 +4,22 @@ import os import xml.etree.ElementTree from dataclasses import dataclass -from typing import List, MutableMapping +from enum import Enum, auto +from typing import List, MutableMapping, Tuple, Union from lark import Lark from lark.visitors import Discard, Transformer, v_args try: - from .types import (AttributeRequirement, ClusterCommandRequirement, ClusterRequirement, RequiredAttributesRule, - RequiredCommandsRule) + from .types import (AttributeRequirement, ClusterCommandRequirement, ClusterRequirement, ClusterValidationRule, + RequiredAttributesRule, RequiredCommandsRule) except ImportError: import sys sys.path.append(os.path.join(os.path.abspath( os.path.dirname(__file__)), "..", "..")) - from matter_idl.lint.types import (AttributeRequirement, ClusterCommandRequirement, ClusterRequirement, RequiredAttributesRule, - RequiredCommandsRule) + from matter_idl.lint.types import (AttributeRequirement, ClusterCommandRequirement, ClusterRequirement, ClusterValidationRule, + RequiredAttributesRule, RequiredCommandsRule) class ElementNotFoundError(Exception): @@ -53,6 +54,17 @@ class DecodedCluster: required_commands: List[RequiredCommand] +class ClusterActionEnum(Enum): + REQUIRE = auto() + REJECT = auto() + + +@dataclass +class ServerClusterRequirement: + action: ClusterActionEnum + id: Union[str, int] + + def DecodeClusterFromXml(element: xml.etree.ElementTree.Element): if element.tag != 'cluster': logging.error("Not a cluster element: %r" % element) @@ -141,6 +153,8 @@ class LintRulesContext: def __init__(self): self._required_attributes_rule = RequiredAttributesRule( "Required attributes") + self._cluster_validation_rule = ClusterValidationRule( + "Cluster validation") self._required_commands_rule = RequiredCommandsRule( "Required commands") @@ -148,28 +162,49 @@ def __init__(self): self._cluster_codes: MutableMapping[str, int] = {} def GetLinterRules(self): - return [self._required_attributes_rule, self._required_commands_rule] + return [self._required_attributes_rule, self._required_commands_rule, self._cluster_validation_rule] def RequireAttribute(self, r: AttributeRequirement): self._required_attributes_rule.RequireAttribute(r) - def RequireClusterInEndpoint(self, name: str, code: int): - """Mark that a specific cluster is always required in the given endpoint - """ + def FindClusterCode(self, name: str) -> Tuple[str, int]: if name not in self._cluster_codes: # Name may be a number. If this can be parsed as a number, accept it anyway try: - cluster_code = parseNumberString(name) - name = "ID_%s" % name + return "ID_%s" % name, parseNumberString(name) except ValueError: logging.error("UNKNOWN cluster name %s" % name) logging.error("Known names: %s" % (",".join(self._cluster_codes.keys()), )) - return + return None else: - cluster_code = self._cluster_codes[name] + return name, self._cluster_codes[name] + + def RequireClusterInEndpoint(self, name: str, code: int): + """Mark that a specific cluster is always required in the given endpoint + """ + cluster_info = self.FindClusterCode(name) + if not cluster_info: + return - self._required_attributes_rule.RequireClusterInEndpoint(ClusterRequirement( + name, cluster_code = cluster_info + + self._cluster_validation_rule.RequireClusterInEndpoint(ClusterRequirement( + endpoint_id=code, + cluster_code=cluster_code, + cluster_name=name, + )) + + def RejectClusterInEndpoint(self, name: str, code: int): + """Mark that a specific cluster is always rejected in the given endpoint + """ + cluster_info = self.FindClusterCode(name) + if not cluster_info: + return + + name, cluster_code = cluster_info + + self._cluster_validation_rule.RejectClusterInEndpoint(ClusterRequirement( endpoint_id=code, cluster_code=cluster_code, cluster_name=name, @@ -265,14 +300,25 @@ def required_global_attribute(self, name, code): return AttributeRequirement(code=code, name=name) @v_args(inline=True) - def specific_endpoint_rule(self, code, *names): - for name in names: - self.context.RequireClusterInEndpoint(name, code) + def specific_endpoint_rule(self, code, *requirements): + for requirement in requirements: + if requirement.action == ClusterActionEnum.REQUIRE: + self.context.RequireClusterInEndpoint(requirement.id, code) + elif requirement.action == ClusterActionEnum.REJECT: + self.context.RejectClusterInEndpoint(requirement.id, code) + else: + raise Exception("Unexpected requirement action %r" % + requirement.action) + return Discard @v_args(inline=True) def required_server_cluster(self, id): - return id + return ServerClusterRequirement(ClusterActionEnum.REQUIRE, id) + + @v_args(inline=True) + def rejected_server_cluster(self, id): + return ServerClusterRequirement(ClusterActionEnum.REJECT, id) class Parser: diff --git a/scripts/py_matter_idl/matter_idl/lint/types.py b/scripts/py_matter_idl/matter_idl/lint/types.py index 08b59ac73bcfb5..1b148ac430c47a 100644 --- a/scripts/py_matter_idl/matter_idl/lint/types.py +++ b/scripts/py_matter_idl/matter_idl/lint/types.py @@ -115,12 +115,93 @@ def _LintImpl(self): pass +class ClusterValidationRule(ErrorAccumulatingRule): + def __init__(self, name): + super().__init__(name) + self._mandatory_clusters: List[ClusterRequirement] = [] + self._rejected_clusters: List[ClusterRequirement] = [] + + def __repr__(self): + result = "ClusterValidationRule{\n" + + if self._mandatory_clusters: + result += " mandatory_clusters:\n" + for cluster in self._mandatory_clusters: + result += " - %r\n" % cluster + + if self._rejected_clusters: + result += " rejected_clusters:\n" + for cluster in self._rejected_clusters: + result += " - %r\n" % cluster + + result += "}" + + return result + + def RequireClusterInEndpoint(self, requirement: ClusterRequirement): + self._mandatory_clusters.append(requirement) + + def RejectClusterInEndpoint(self, requirement: ClusterRequirement): + self._rejected_clusters.append(requirement) + + def _ClusterCode(self, name: str, location: Optional[LocationInFile]): + """Finds the server cluster definition with the given name. + + On error returns None and _lint_errors is updated internlly + """ + if not self._idl: + raise MissingIdlError() + + cluster_definition = [ + c for c in self._idl.clusters if c.name == name and c.side == ClusterSide.SERVER + ] + if not cluster_definition: + self._AddLintError( + "Cluster definition for %s not found" % name, location) + return None + + if len(cluster_definition) > 1: + self._AddLintError( + "Multiple cluster definitions found for %s" % name, location) + return None + + return cluster_definition[0].code + + def _LintImpl(self): + if not self._idl: + raise MissingIdlError() + + for endpoint in self._idl.endpoints: + cluster_codes = set() + for cluster in endpoint.server_clusters: + cluster_code = self._ClusterCode( + cluster.name, self._ParseLocation(cluster.parse_meta)) + if not cluster_code: + continue + + cluster_codes.add(cluster_code) + + for requirement in self._mandatory_clusters: + if requirement.endpoint_id != endpoint.number: + continue + + if requirement.cluster_code not in cluster_codes: + self._AddLintError("Endpoint %d DOES NOT expose cluster %s (%d)" % + (requirement.endpoint_id, requirement.cluster_name, requirement.cluster_code), location=None) + + for requirement in self._rejected_clusters: + if requirement.endpoint_id != endpoint.number: + continue + + if requirement.cluster_code in cluster_codes: + self._AddLintError("Endpoint %d EXPOSES cluster %s (%d)" % + (requirement.endpoint_id, requirement.cluster_name, requirement.cluster_code), location=None) + + class RequiredAttributesRule(ErrorAccumulatingRule): def __init__(self, name): - super(RequiredAttributesRule, self).__init__(name) - # Map attribute code to name + super().__init__(name) self._mandatory_attributes: List[AttributeRequirement] = [] - self._mandatory_clusters: List[ClusterRequirement] = [] def __repr__(self): result = "RequiredAttributesRule{\n" @@ -130,11 +211,6 @@ def __repr__(self): for attr in self._mandatory_attributes: result += " - %r\n" % attr - if self._mandatory_clusters: - result += " mandatory_clusters:\n" - for cluster in self._mandatory_clusters: - result += " - %r\n" % cluster - result += "}" return result @@ -142,9 +218,6 @@ def RequireAttribute(self, attr: AttributeRequirement): """Mark an attribute required""" self._mandatory_attributes.append(attr) - def RequireClusterInEndpoint(self, requirement: ClusterRequirement): - self._mandatory_clusters.append(requirement) - def _ServerClusterDefinition(self, name: str, location: Optional[LocationInFile]): """Finds the server cluster definition with the given name. @@ -213,14 +286,6 @@ def _LintImpl(self): check.name, check.code), self._ParseLocation(cluster.parse_meta)) - for requirement in self._mandatory_clusters: - if requirement.endpoint_id != endpoint.number: - continue - - if requirement.cluster_code not in cluster_codes: - self._AddLintError("Endpoint %d does not expose cluster %s (%d)" % - (requirement.endpoint_id, requirement.cluster_name, requirement.cluster_code), location=None) - @dataclass class ClusterCommandRequirement: diff --git a/scripts/py_matter_idl/matter_idl/test_generators.py b/scripts/py_matter_idl/matter_idl/test_generators.py index 5cb6729e19cb9b..146b6244de6cb2 100755 --- a/scripts/py_matter_idl/matter_idl/test_generators.py +++ b/scripts/py_matter_idl/matter_idl/test_generators.py @@ -31,7 +31,6 @@ from matter_idl.matter_idl_parser import CreateParser from matter_idl.generators import GeneratorStorage -from matter_idl.generators.bridge import BridgeGenerator from matter_idl.generators.cpp.application import CppApplicationGenerator from matter_idl.generators.java import JavaClassGenerator, JavaJNIGenerator from matter_idl.matter_idl_types import Idl @@ -120,8 +119,6 @@ def _create_generator(self, storage: GeneratorStorage, idl: Idl): return JavaJNIGenerator(storage, idl) if self.generator_name.lower() == 'java-class': return JavaClassGenerator(storage, idl) - if self.generator_name.lower() == 'bridge': - return BridgeGenerator(storage, idl) if self.generator_name.lower() == 'cpp-app': return CppApplicationGenerator(storage, idl) if self.generator_name.lower() == 'custom-example-proto': 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 7646b1d3d14a06..c16e97b5dba7d4 100644 --- a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml +++ b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml @@ -51,30 +51,6 @@ java-class: java/chip/devicecontroller/ClusterReadMapping.java: outputs/several_clusters/java/ClusterReadMapping.java java/chip/devicecontroller/ClusterIDMapping.java: outputs/several_clusters/java/ClusterIDMapping.java -bridge: - inputs/simple_attribute.matter: - bridge/BridgeClustersImpl.h: outputs/simple_attribute/bridge/BridgeClustersImpl.h - bridge/MyClusterServer.h: outputs/simple_attribute/bridge/MyClusterServer.h - - inputs/global_struct_attribute.matter: - bridge/BridgeClustersImpl.h: outputs/global_struct_attribute/bridge/BridgeClustersImpl.h - bridge/DemoClusterServer.h: outputs/global_struct_attribute/bridge/DemoClusterServer.h - - inputs/cluster_struct_attribute.matter: - bridge/BridgeClustersImpl.h: outputs/cluster_struct_attribute/bridge/BridgeClustersImpl.h - bridge/DemoClusterServer.h: outputs/cluster_struct_attribute/bridge/DemoClusterServer.h - - inputs/several_clusters.matter: - bridge/BridgeClustersImpl.h: outputs/several_clusters/bridge/BridgeClustersImpl.h - bridge/FirstServer.h: outputs/several_clusters/bridge/FirstServer.h - bridge/SecondServer.h: outputs/several_clusters/bridge/SecondServer.h - bridge/ThirdServer.h: outputs/several_clusters/bridge/ThirdServer.h - bridge/Third.h: outputs/several_clusters/bridge/Third.h - - inputs/cluster_with_commands.matter: - bridge/BridgeClustersImpl.h: outputs/cluster_with_commands/bridge/BridgeClustersImpl.h - bridge/OnOff.h: outputs/cluster_with_commands/bridge/OnOff.h - cpp-app: inputs/several_clusters.matter: app/PluginApplicationCallbacks.h: outputs/several_clusters/cpp-app/PluginApplicationCallbacks.h diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/BridgeClustersImpl.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/BridgeClustersImpl.h deleted file mode 100644 index 31cb340dd7e8a5..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/BridgeClustersImpl.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include -#include "bridge/DemoCluster.h" - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { - - { - 10, - "DemoCluster", - sizeof(DemoClusterCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) DemoClusterCluster(); - }, - }, -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/DemoClusterServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/DemoClusterServer.h deleted file mode 100644 index b6abee142e78ce..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/DemoClusterServer.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct DemoClusterCluster : public GeneratedCluster -{ - - DemoClusterCluster() : - mSingleFailSafe(chip::CharSpan("singleFailSafe"), 5, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_STRUCT_ATTRIBUTE_TYPE, sizeof(ArmFailSafeRequest)), - mArmFailsafes(chip::CharSpan("armFailsafes"), 100, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_ARRAY_ATTRIBUTE_TYPE, sizeof(ArmFailSafeRequest)) - { - } - - static constexpr uint32_t kClusterId =10; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSingleFailSafe), - static_cast(&mArmFailsafes), - }); - } - - - Attribute mSingleFailSafe; - ListAttribute> mArmFailsafes; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/BridgeClustersImpl.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/BridgeClustersImpl.h deleted file mode 100644 index 0484909c914739..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/BridgeClustersImpl.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include -#include "bridge/OnOff.h" - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { - - { - 6, - "OnOff", - sizeof(OnOffCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) OnOffCluster(); - }, - }, -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/OnOff.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/OnOff.h deleted file mode 100644 index 383751db0cd325..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/OnOff.h +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct OnOffCluster : public GeneratedCluster -{ - - OnOffCluster() : - mOnOff(chip::CharSpan("onOff"), 0, 0 | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_BOOLEAN_ATTRIBUTE_TYPE, 1), - mFeatureMap(chip::CharSpan("featureMap"), 65532, 0 | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_BITMAP32_ATTRIBUTE_TYPE, 4), - mClusterRevision(chip::CharSpan("clusterRevision"), 65533, 0 | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_INT16U_ATTRIBUTE_TYPE, 2, ZCL_ON_OFF_CLUSTER_REVISION) - { - } - - static constexpr uint32_t kClusterId =6; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mOnOff), - static_cast(&mFeatureMap), - static_cast(&mClusterRevision), - }); - } - - - Attribute mOnOff; - Attribute mFeatureMap; - Attribute mClusterRevision; - static const chip::CommandId mIncomingCommandList[]; - const chip::CommandId * GetIncomingCommandList() override - { - return mIncomingCommandList; - } -}; -#ifndef ON_OFF_CLUSTER_INCOMING_COMMANDS -#define ON_OFF_CLUSTER_INCOMING_COMMANDS -const chip::CommandId OnOffCluster::mIncomingCommandList[] = { - 0, - 1, - 2, - chip::kInvalidCommandId -}; -#endif - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/BridgeClustersImpl.h b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/BridgeClustersImpl.h deleted file mode 100644 index fb63878646d529..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/BridgeClustersImpl.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include -#include "bridge/DemoCluster.h" - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { - - { - 18, - "DemoCluster", - sizeof(DemoClusterCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) DemoClusterCluster(); - }, - }, -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/DemoClusterServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/DemoClusterServer.h deleted file mode 100644 index a449dc374a0862..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/DemoClusterServer.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct DemoClusterCluster : public GeneratedCluster -{ - - DemoClusterCluster() : - mSingleLabel(chip::CharSpan("singleLabel"), 32, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_STRUCT_ATTRIBUTE_TYPE, sizeof(LabelStruct)), - mSomeLabels(chip::CharSpan("someLabels"), 33, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_ARRAY_ATTRIBUTE_TYPE, sizeof(LabelStruct)) - { - } - - static constexpr uint32_t kClusterId =18; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSingleLabel), - static_cast(&mSomeLabels), - }); - } - - - Attribute mSingleLabel; - ListAttribute> mSomeLabels; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/BridgeClustersImpl.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/BridgeClustersImpl.h deleted file mode 100644 index e94ca747c56970..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/BridgeClustersImpl.h +++ /dev/null @@ -1,53 +0,0 @@ -#pragma once - -#include -#include "bridge/First.h" -#include "bridge/Second.h" -#include "bridge/Third.h" -#include "bridge/Third.h" - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { - - { - 1, - "First", - sizeof(FirstCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) FirstCluster(); - }, - }, - { - 2, - "Second", - sizeof(SecondCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) SecondCluster(); - }, - }, - { - 3, - "Third", - sizeof(ThirdCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) ThirdCluster(); - }, - }, - { - 3, - "Third", - sizeof(ThirdCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) ThirdCluster(); - }, - }, -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/FirstServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/FirstServer.h deleted file mode 100644 index 5cb389e01564d1..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/FirstServer.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct FirstCluster : public GeneratedCluster -{ - - FirstCluster() : - mSomeInteger(chip::CharSpan("someInteger"), 1, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_INT16U_ATTRIBUTE_TYPE, 2) - { - } - - static constexpr uint32_t kClusterId =1; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSomeInteger), - }); - } - - - Attribute mSomeInteger; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/SecondServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/SecondServer.h deleted file mode 100644 index a0d24591b94c62..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/SecondServer.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct SecondCluster : public GeneratedCluster -{ - - SecondCluster() : - mSomeBytes(chip::CharSpan("someBytes"), 123, 0 | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_OCTET_STRING_ATTRIBUTE_TYPE, 32) - { - } - - static constexpr uint32_t kClusterId =2; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSomeBytes), - }); - } - - - Attribute mSomeBytes; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/Third.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/Third.h deleted file mode 100644 index 55344700f7814d..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/Third.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct ThirdCluster : public GeneratedCluster -{ - - ThirdCluster() : - mSomeEnum(chip::CharSpan("someEnum"), 10, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_ENUM8_ATTRIBUTE_TYPE, 1), - mClusterRevision(chip::CharSpan("clusterRevision"), 65533, 0 | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_INT16U_ATTRIBUTE_TYPE, 2, ZCL_THIRD_CLUSTER_REVISION) - { - } - - static constexpr uint32_t kClusterId =3; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSomeEnum), - static_cast(&mClusterRevision), - }); - } - - - Attribute mSomeEnum; - Attribute mClusterRevision; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/ThirdServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/ThirdServer.h deleted file mode 100644 index 67176424a52608..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/ThirdServer.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct ThirdCluster : public GeneratedCluster -{ - - ThirdCluster() : - mSomeEnum(chip::CharSpan("someEnum"), 10, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_ENUM8_ATTRIBUTE_TYPE, 1), - mOptions(chip::CharSpan("options"), 20, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_BITMAP8_ATTRIBUTE_TYPE, 1) - { - } - - static constexpr uint32_t kClusterId =3; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSomeEnum), - static_cast(&mOptions), - }); - } - - - Attribute mSomeEnum; - Attribute mOptions; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/BridgeClustersImpl.h b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/BridgeClustersImpl.h deleted file mode 100644 index daf5c1bcee41fe..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/BridgeClustersImpl.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include -#include "bridge/MyCluster.h" - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { - - { - 123, - "MyCluster", - sizeof(MyClusterCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) MyClusterCluster(); - }, - }, -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/MyClusterServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/MyClusterServer.h deleted file mode 100644 index 47445252f41f77..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/MyClusterServer.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct MyClusterCluster : public GeneratedCluster -{ - - MyClusterCluster() : - mClusterAttr(chip::CharSpan("clusterAttr"), 1, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_INT16U_ATTRIBUTE_TYPE, 2) - { - } - - static constexpr uint32_t kClusterId =123; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mClusterAttr), - }); - } - - - Attribute mClusterAttr; -}; - -} diff --git a/scripts/py_matter_idl/setup.cfg b/scripts/py_matter_idl/setup.cfg index 91e84f82ca8990..fec72b8fc14017 100644 --- a/scripts/py_matter_idl/setup.cfg +++ b/scripts/py_matter_idl/setup.cfg @@ -30,7 +30,3 @@ matter_idl = generators/java/ChipClustersCpp.jinja generators/cpp/application/CallbackStubSource.jinja generators/cpp/application/PluginApplicationCallbacksHeader.jinja - generators/bridge/BridgeClustersHeader.jinja - generators/bridge/BridgeClustersCommon.jinja - generators/bridge/BridgeClustersCpp.jinja - generators/bridge/BridgeClustersGlobalStructs.jinja diff --git a/scripts/py_matter_yamltests/matter_yamltests/constraints.py b/scripts/py_matter_yamltests/matter_yamltests/constraints.py index 572da6362aa266..7c3e2f99cc5dfd 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/constraints.py +++ b/scripts/py_matter_yamltests/matter_yamltests/constraints.py @@ -232,6 +232,8 @@ def check_response(self, value, value_type_name) -> bool: success = False if self._type == 'boolean' and type(value) is bool: success = True + elif self._type == 'struct' and type(value) is dict: + success = True elif self._type == 'list' and type(value) is list: success = True elif self._type == 'char_string' and type(value) is str: @@ -367,6 +369,8 @@ def get_reason(self, value, value_type_name) -> str: if type(value) is bool: types.append('boolean') + elif type(value) is dict: + types.append('struct') elif type(value) is list: types.append('list') elif type(value) is str: diff --git a/scripts/py_matter_yamltests/matter_yamltests/parser.py b/scripts/py_matter_yamltests/matter_yamltests/parser.py index 6b0cd11999bca4..32f54734d83af5 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/parser.py +++ b/scripts/py_matter_yamltests/matter_yamltests/parser.py @@ -24,6 +24,18 @@ from .pics_checker import PICSChecker from .yaml_loader import YamlLoader +ANY_COMMANDS_CLUSTER_NAME = 'AnyCommands' +ANY_COMMANDS_LIST = [ + 'CommandById', + 'ReadById', + 'WriteById', + 'SubscribeById', + 'ReadEventById', + 'SubscribeEventById', + 'ReadAll', + 'SubscribeAll', +] + class UnknownPathQualifierError(TestStepError): """Raise when an attribute/command/event name is not found in the definitions.""" @@ -235,7 +247,7 @@ def __init__(self, test: dict, config: dict, definitions: SpecDefinitions, pics_ def _update_mappings(self, test: dict, definitions: SpecDefinitions): cluster_name = self.cluster - if definitions is None or not definitions.has_cluster_by_name(cluster_name): + if definitions is None or not definitions.has_cluster_by_name(cluster_name) or cluster_name == ANY_COMMANDS_CLUSTER_NAME or self.command in ANY_COMMANDS_LIST: self.argument_mapping = None self.response_mapping = None self.response_mapping_name = None @@ -756,7 +768,7 @@ def _response_values_validation(self, expected_response, received_response, resu break received_value = received_response.get('value') - if not self.is_attribute and not self.is_event: + if not self.is_attribute and not self.is_event and not (self.command in ANY_COMMANDS_LIST): expected_name = value.get('name') if expected_name not in received_value: result.error(check_type, error_name_does_not_exist.format( diff --git a/scripts/py_matter_yamltests/matter_yamltests/runner.py b/scripts/py_matter_yamltests/matter_yamltests/runner.py index 9d560216321494..08de8d758e84fd 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/runner.py +++ b/scripts/py_matter_yamltests/matter_yamltests/runner.py @@ -133,7 +133,7 @@ async def execute(self, request): async def stop(self): return - def run(self, parser_builder_config: TestParserBuilderConfig, runner_config: TestRunnerConfig): + async def run(self, parser_builder_config: TestParserBuilderConfig, runner_config: TestRunnerConfig): if runner_config and runner_config.hooks: start = time.time() runner_config.hooks.start(len(parser_builder_config.tests)) @@ -143,9 +143,7 @@ def run(self, parser_builder_config: TestParserBuilderConfig, runner_config: Tes if not parser or not runner_config: continue - loop = asyncio.get_event_loop() - result = loop.run_until_complete( - self._run_with_timeout(parser, runner_config)) + result = await self._run_with_timeout(parser, runner_config) if isinstance(result, Exception): raise (result) elif not result: diff --git a/scripts/py_matter_yamltests/matter_yamltests/websocket_runner.py b/scripts/py_matter_yamltests/matter_yamltests/websocket_runner.py index 9a40ec5977e5a4..f32968debfacfc 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/websocket_runner.py +++ b/scripts/py_matter_yamltests/matter_yamltests/websocket_runner.py @@ -23,6 +23,7 @@ from .runner import TestRunner _KEEP_ALIVE_TIMEOUT_IN_SECONDS = 40 +_MAX_MESSAGE_SIZE_IN_BYTES = 10485760 # 10 MB @dataclass @@ -67,7 +68,7 @@ async def _start_client(self, url, max_retries=4, interval_between_retries=1): start = time.time() try: self._hooks.connecting(url) - connection = await websockets.connect(url, ping_timeout=_KEEP_ALIVE_TIMEOUT_IN_SECONDS) + connection = await websockets.connect(url, ping_timeout=_KEEP_ALIVE_TIMEOUT_IN_SECONDS, max_size=_MAX_MESSAGE_SIZE_IN_BYTES) duration = round((time.time() - start) * 1000, 0) self._hooks.success(duration) return connection diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint index af393232526ef3..69a6cee7f88af0 100644 --- a/scripts/rules.matterlint +++ b/scripts/rules.matterlint @@ -23,6 +23,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/concentration-measurement-clu load "../src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-select-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml"; @@ -36,6 +37,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-select-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml"; @@ -56,7 +58,10 @@ load "../src/app/zap-templates/zcl/data-model/chip/proxy-discovery-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/proxy-valid-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/pwm-cluster.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-select-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-select-cluster.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-select-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/scene.xml"; load "../src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml"; @@ -71,6 +76,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster. load "../src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/window-covering.xml"; load "../src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml"; @@ -82,6 +88,7 @@ load "../src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-c load "../src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml"; + all endpoints { // These attributes follow a different code path and do not have to be // present in the .matter file @@ -106,6 +113,11 @@ endpoint 0 { require server cluster OperationalCredentials; require server cluster GeneralDiagnostics; + // Example rejection of clusters: + // + // reject server cluster Scenes; + // reject server cluster Groups; + // Required only if !CustomNetworkConfig. // require server cluster NetworkCommissioning; diff --git a/scripts/setup/clang.json b/scripts/setup/clang.json deleted file mode 100644 index 5c09ee6798672f..00000000000000 --- a/scripts/setup/clang.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "packages": [ - { - "path": "fuchsia/third_party/clang/mac-arm64", - "platforms": [ - "mac-arm64" - ], - "tags": [ - "git_revision:6d667d4b261e81f325756fdfd5bb43b3b3d2451d" - ] - } - ] -} diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index e7ce7030c6d487..33cb08901a93e4 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -289,7 +289,7 @@ pyserial==3.5 # bflb-iot-tool # mbed-os-tools # mbed-tools -pytest==6.2.5 ; platform_machine != "aarch64" and sys_platform == "linux" +pytest==6.2.5 ; sys_platform == "linux" # via # -r requirements.mbed.txt # pytest-json-report diff --git a/scripts/setup/environment.json b/scripts/setup/environment.json index 6c32bb62ebe8e4..ebe77d9db6dbc8 100644 --- a/scripts/setup/environment.json +++ b/scripts/setup/environment.json @@ -2,7 +2,6 @@ "cipd_package_files": [ "third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/cipd_setup/arm.json", "third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/cipd_setup/pigweed.json", - "scripts/setup/clang.json", "scripts/setup/python.json", "scripts/setup/zap.json" ], diff --git a/scripts/setup/requirements.mbed.txt b/scripts/setup/requirements.mbed.txt index 97483fe546b495..58499620651433 100644 --- a/scripts/setup/requirements.mbed.txt +++ b/scripts/setup/requirements.mbed.txt @@ -1,5 +1,5 @@ mbed-tools>=7.55.1.dev1 ; platform_machine != 'aarch64' and sys_platform == 'linux' -pytest==6.2.5 ; platform_machine != 'aarch64' and sys_platform == 'linux' +pytest==6.2.5 ; sys_platform == 'linux' mbed-ls==1.8.11 ; platform_machine != 'aarch64' and sys_platform == 'linux' pdoc3 ; platform_machine != 'aarch64' and sys_platform == 'linux' gitpython ; platform_machine != 'aarch64' and sys_platform == 'linux' diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index c35c5392b12634..945d5ddbb39019 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -128,17 +128,15 @@ def _GetSlowTests() -> Set[str]: def _GetInDevelopmentTests() -> Set[str]: - """Tests that fail in YAML for some reason. - - Currently this is empty and returns an empty set, but this is kept around in case - there are tests that are a work in progress. - """ + """Tests that fail in YAML for some reason.""" return { "Test_AddNewFabricFromExistingFabric.yaml", # chip-repl does not support GetCommissionerRootCertificate and IssueNocChain command "TestEqualities.yaml", # chip-repl does not support pseudo-cluster commands that return a value "TestExampleCluster.yaml", # chip-repl does not load custom pseudo clusters - "TestClientMonitoringCluster.yaml", # Client Monitoring Tests need a rework after the XML update - "Test_TC_TIMESYNC_1_1.yaml" # Time sync SDK is not yet ready + "Test_TC_TIMESYNC_1_1.yaml", # Time sync SDK is not yet ready + "TestAttributesById.yaml", # chip-repl does not support AnyCommands (06/06/2023) + "TestCommandsById.yaml", # chip-repl does not support AnyCommands (06/06/2023) + "TestEventsById.yaml", # chip-repl does not support AnyCommands (06/06/2023) } diff --git a/scripts/tests/yaml/runner.py b/scripts/tests/yaml/runner.py index 1c9aca681b3109..04f30401eb1b02 100755 --- a/scripts/tests/yaml/runner.py +++ b/scripts/tests/yaml/runner.py @@ -16,6 +16,7 @@ import relative_importer # isort: split # noqa: F401 +import asyncio import importlib import os import sys @@ -269,7 +270,8 @@ def parse(parser_group: ParserGroup): runner_config = None runner = TestRunner() - return runner.run(parser_group.builder_config, runner_config) + loop = asyncio.get_event_loop() + return loop.run_until_complete(runner.run(parser_group.builder_config, runner_config)) @runner_base.command() @@ -279,7 +281,8 @@ def dry_run(parser_group: ParserGroup): runner_config = TestRunnerConfig(hooks=TestRunnerLogger()) runner = TestRunner() - return runner.run(parser_group.builder_config, runner_config) + loop = asyncio.get_event_loop() + return loop.run_until_complete(runner.run(parser_group.builder_config, runner_config)) @runner_base.command() @@ -293,7 +296,8 @@ def run(parser_group: ParserGroup, adapter: str, stop_on_error: bool, stop_on_wa runner_config = TestRunnerConfig(adapter, parser_group.pseudo_clusters, runner_options, runner_hooks) runner = TestRunner() - return runner.run(parser_group.builder_config, runner_config) + loop = asyncio.get_event_loop() + return loop.run_until_complete(runner.run(parser_group.builder_config, runner_config)) @runner_base.command() @@ -316,7 +320,8 @@ def websocket(parser_group: ParserGroup, adapter: str, stop_on_error: bool, stop server_address, server_port, server_path, server_arguments, websocket_runner_hooks) runner = WebSocketRunner(websocket_runner_config) - return runner.run(parser_group.builder_config, runner_config) + loop = asyncio.get_event_loop() + return loop.run_until_complete(runner.run(parser_group.builder_config, runner_config)) @runner_base.command() @@ -331,7 +336,8 @@ def chip_repl(parser_group: ParserGroup, adapter: str, stop_on_error: bool, stop runner_config = TestRunnerConfig(adapter, parser_group.pseudo_clusters, runner_options, runner_hooks) runner = __import__(runner, fromlist=[None]).Runner(repl_storage_path, commission_on_network_dut) - return runner.run(parser_group.builder_config, runner_config) + loop = asyncio.get_event_loop() + return loop.run_until_complete(runner.run(parser_group.builder_config, runner_config)) @runner_base.command() diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index e2ec38e223c16a..e7fc6b1b5b72bd 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -33,7 +33,6 @@ '/Test', '/tests/', '/tools/', - r'/lib/assign/ValueAssign\.h', # Platforms can opt in or out. '/darwin/', diff --git a/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py b/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py index c013bbbd1ffa5c..6c2af9dc890617 100644 --- a/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py +++ b/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py @@ -545,13 +545,13 @@ def base64_str(s): return base64.b64decode(s) log.error(("Requested verification of the JSON file using jsonschema, but the module is not installed. \n" "Install only the module by invoking: pip3 install jsonschema \n" "Alternatively, install it with all dependencies for Matter by invoking: pip3 install " - "-r ./scripts/requirements.nrfconnect.txt from the Matter root directory.")) + "-r ./scripts/setup/requirements.nrfconnect.txt from the Matter root directory.")) return if args.generate_onboarding and no_onboarding_modules: log.error(("Requested generation of onboarding codes, but the some modules are not installed. \n" "Install all dependencies for Matter by invoking: pip3 install " - "-r ./scripts/requirements.nrfconnect.txt from the Matter root directory.")) + "-r ./scripts/setup/requirements.nrfconnect.txt from the Matter root directory.")) return generator = FactoryDataGenerator(args) diff --git a/scripts/tools/zap/generate.py b/scripts/tools/zap/generate.py index cb932b0cefc2eb..5b1f4f4c629f49 100755 --- a/scripts/tools/zap/generate.py +++ b/scripts/tools/zap/generate.py @@ -23,6 +23,7 @@ import subprocess import sys import tempfile +import traceback import urllib.request from dataclasses import dataclass from pathlib import Path @@ -216,6 +217,59 @@ def runGeneration(cmdLineArgs): extractGeneratedIdl(output_dir, zap_file) +def getClangFormatBinaryChoices(): + """ + Returns an ordered list of paths that may be suitable clang-format versions + """ + PW_CLANG_FORMAT_PATH = 'cipd/packages/pigweed/bin/clang-format' + + if 'PW_ENVIRONMENT_ROOT' in os.environ: + yield os.path.join(os.environ["PW_ENVIRONMENT_ROOT"], PW_CLANG_FORMAT_PATH) + + dot_name = os.path.join(CHIP_ROOT_DIR, '.environment', PW_CLANG_FORMAT_PATH) + if os.path.exists(dot_name): + yield dot_name + + os_name = shutil.which('clang-format') + if os_name: + yield os_name + + +def getClangFormatBinary(): + """Fetches the clang-format binary that is to be used for formatting. + + Tries to figure out where the pigweed-provided binary is (via cipd) + """ + for binary in getClangFormatBinaryChoices(): + # Running the binary with `--version` yields a string of the form: + # "Fuchsia clang-format version 17.0.0 (https://llvm.googlesource.com/llvm-project 6d667d4b261e81f325756fdfd5bb43b3b3d2451d)" + # + # the SHA at the end generally should match pigweed version + + try: + version_string = subprocess.check_output([binary, '--version']).decode('utf8') + + pigweed_config = json.load( + open(os.path.join(CHIP_ROOT_DIR, 'third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/cipd_setup/pigweed.json'))) + clang_config = [p for p in pigweed_config['packages'] if p['path'].startswith('fuchsia/third_party/clang/')][0] + + # Tags should be like: + # ['git_revision:895b55537870cdaf6e4c304a09f4bf01954ccbd6'] + prefix, sha = clang_config['tags'][0].split(':') + + if sha not in version_string: + print('WARNING: clang-format may not be the right version:') + print(' PIGWEED TAG: %s' % clang_config['tags'][0]) + print(' ACTUAL VERSION: %s' % version_string) + except: + print("Failed to validate clang version.") + traceback.print_last() + + return binary + + raise Exception('Could not find a suitable clang-format') + + def runClangPrettifier(templates_file, output_dir): listOfSupportedFileExtensions = [ '.js', '.h', '.c', '.hpp', '.cpp', '.m', '.mm'] @@ -228,28 +282,17 @@ def runClangPrettifier(templates_file, output_dir): filepath)[1] in listOfSupportedFileExtensions, outputs)) if len(clangOutputs) > 0: - # NOTE: clang-format may differ in time. Currently pigweed comes - # with clang-format 15. CI may have clang-format-10 installed - # on linux. - # - # We generally want consistent formatting, so - # at this point attempt to use clang-format 15. - clang_formats = ['clang-format-15', 'clang-format'] - for clang_format in clang_formats: - args = [clang_format, '-i'] - args.extend(clangOutputs) - try: - subprocess.check_call(args) - err = None - print('Formatted using %s (%s)' % (clang_format, subprocess.check_output([clang_format, '--version']))) - for outputName in clangOutputs: - print(' - %s' % outputName) - break - except Exception as thrown: - err = thrown - # Press on to the next binary name - if err is not None: - raise err + # NOTE: clang-format differs output in time. We generally would be + # compatible only with pigweed provided clang-format (which is + # tracking non-released clang). + clang_format = getClangFormatBinary() + args = [clang_format, '-i'] + args.extend(clangOutputs) + subprocess.check_call(args) + err = None + print('Formatted using %s (%s)' % (clang_format, subprocess.check_output([clang_format, '--version']))) + for outputName in clangOutputs: + print(' - %s' % outputName) except Exception as err: print('clang-format error:', err) diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 6c08f768a3255c..32b040ada86d42 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -400,7 +400,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -556,7 +556,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9090,7 +9090,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9262,7 +9262,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -21275,7 +21275,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -21431,7 +21431,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index 3d90f784db4050..e175e3e4a20474 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -360,7 +360,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -516,7 +516,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5797,7 +5797,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5953,7 +5953,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index 17faea8ccaa42d..6354fcfd514c8b 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -764,7 +764,7 @@ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(BOOLEAN), 0 }, /* SceneValid */ \ { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000000, 1, ZAP_TYPE(BOOLEAN), ZAP_ATTRIBUTE_MASK(TOKENIZE) }, /* OnOff */ \ @@ -875,7 +875,7 @@ { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ - { ZAP_LONG_DEFAULTS_INDEX(20), 0x00000000, 33, ZAP_TYPE(CHAR_STRING), 0 }, /* Description */ \ + { ZAP_LONG_DEFAULTS_INDEX(20), 0x00000000, 65, ZAP_TYPE(CHAR_STRING), 0 }, /* Description */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00000001, 2, ZAP_TYPE(ENUM16), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StandardNamespace */ \ { ZAP_SIMPLE_DEFAULT(255), 0xFFF10001, 1, ZAP_TYPE(INT8U), 0 }, /* ManufacturerExtension */ \ { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SupportedModes */ \ @@ -2488,7 +2488,7 @@ .clusterId = 0x00000050, \ .attributes = ZAP_ATTRIBUTE_INDEX(315), \ .attributeCount = 9, \ - .clusterSize = 45, \ + .clusterSize = 77, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 125 ), \ @@ -2947,7 +2947,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 28, 361 }, { ZAP_CLUSTER_INDEX(28), 44, 3458 }, { ZAP_CLUSTER_INDEX(72), 5, 105 }, \ + { ZAP_CLUSTER_INDEX(0), 28, 361 }, { ZAP_CLUSTER_INDEX(28), 44, 3490 }, { ZAP_CLUSTER_INDEX(72), 5, 105 }, \ { ZAP_CLUSTER_INDEX(77), 1, 0 }, \ } @@ -2960,7 +2960,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3924) +#define ATTRIBUTE_MAX_SIZE (3956) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (4) diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index f76663cc195675..38e534093d1599 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -18,6 +18,7 @@ import("${chip_root}/src/platform/device.gni") import("${chip_root}/build/chip/buildconfig_header.gni") import("common_flags.gni") +import("icd/icd.gni") declare_args() { # Enable strict schema checks. @@ -210,6 +211,10 @@ static_library("app") { "${nlio_root}:nlio", ] + if (chip_enable_icd_server) { + public_deps += [ "${chip_root}/src/app/icd:server-srcs" ] + } + cflags = [ "-Wconversion" ] public_configs = [ "${chip_root}/src:includes" ] diff --git a/src/app/EventManagement.cpp b/src/app/EventManagement.cpp index bdda0bfcc9cbdc..7713ba18f3e468 100644 --- a/src/app/EventManagement.cpp +++ b/src/app/EventManagement.cpp @@ -173,7 +173,7 @@ CHIP_ERROR EventManagement::EnsureSpaceInCircularBuffer(size_t aRequiredSpace, P // Check that we have this much space in all our event buffers that might // hold the event. If we do not, that will prevent the event from being - // properly evicted into higher-priority bufers. We want to discover + // properly evicted into higher-priority buffers. We want to discover // this early, so that testing surfaces the need to make those buffers // larger. for (auto * currentBuffer = mpEventBuffer; currentBuffer; currentBuffer = currentBuffer->GetNextCircularEventBuffer()) diff --git a/src/app/EventManagement.h b/src/app/EventManagement.h index fdaff6cd393fbc..2286328214a0c5 100644 --- a/src/app/EventManagement.h +++ b/src/app/EventManagement.h @@ -399,9 +399,9 @@ class EventManagement int mFieldsToRead = 0; /* PriorityLevel and DeltaTime are there if that is not first event when putting events in report*/ #if CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS - Timestamp mCurrentTime = Timestamp::System(System::Clock::kZero); -#else // CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS Timestamp mCurrentTime = Timestamp::Epoch(System::Clock::kZero); +#else // CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + Timestamp mCurrentTime = Timestamp::System(System::Clock::kZero); #endif // CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS PriorityLevel mPriority = PriorityLevel::First; ClusterId mClusterId = 0; diff --git a/src/app/EventPathParams.h b/src/app/EventPathParams.h index 29af405c60b515..1bf6b93f79fee2 100644 --- a/src/app/EventPathParams.h +++ b/src/app/EventPathParams.h @@ -35,7 +35,7 @@ struct EventPathParams return other.mEndpointId == mEndpointId && other.mClusterId == mClusterId && other.mEventId == mEventId; } - bool HasEventWildcard() const { return HasWildcardEndpointId() || HasWildcardClusterId() || HasWildcardEventId(); } + bool IsWildcardPath() const { return HasWildcardEndpointId() || HasWildcardClusterId() || HasWildcardEventId(); } // For event, an event id can only be interpreted if the cluster id is known. bool IsValidEventPath() const { return !(HasWildcardClusterId() && !HasWildcardEventId()); } diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 2a5dd2f3216932..e48a4ef4330b6d 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -647,6 +647,10 @@ Status InteractionModelEngine::OnUnsolicitedReportData(Messaging::ExchangeContex ReportDataMessage::Parser report; VerifyOrReturnError(report.Init(reader) == CHIP_NO_ERROR, Status::InvalidAction); +#if CHIP_CONFIG_IM_PRETTY_PRINT + report.PrettyPrint(); +#endif + SubscriptionId subscriptionId = 0; VerifyOrReturnError(report.GetSubscriptionId(&subscriptionId) == CHIP_NO_ERROR, Status::InvalidAction); VerifyOrReturnError(report.ExitContainer() == CHIP_NO_ERROR, Status::InvalidAction); diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index acfa30a5e0701d..21eb83f65ad584 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -433,7 +433,7 @@ CHIP_ERROR ReadClient::OnMessageReceived(Messaging::ExchangeContext * apExchange if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::ReportData)) { - err = ProcessReportData(std::move(aPayload)); + err = ProcessReportData(std::move(aPayload), ReportType::kContinuingTransaction); } else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::SubscribeResponse)) { @@ -487,7 +487,7 @@ void ReadClient::OnUnsolicitedReportData(Messaging::ExchangeContext * apExchange // mReadPrepareParams.mSessionHolder.Grab(mExchange->GetSessionHandle()); - CHIP_ERROR err = ProcessReportData(std::move(aPayload)); + CHIP_ERROR err = ProcessReportData(std::move(aPayload), ReportType::kUnsolicited); if (err != CHIP_NO_ERROR) { if (err == CHIP_ERROR_INVALID_SUBSCRIPTION) @@ -504,7 +504,7 @@ void ReadClient::OnUnsolicitedReportData(Messaging::ExchangeContext * apExchange } } -CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload) +CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload, ReportType aReportType) { CHIP_ERROR err = CHIP_NO_ERROR; ReportDataMessage::Parser report; @@ -518,7 +518,10 @@ CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload) SuccessOrExit(err); #if CHIP_CONFIG_IM_PRETTY_PRINT - report.PrettyPrint(); + if (aReportType != ReportType::kUnsolicited) + { + report.PrettyPrint(); + } #endif err = report.GetSuppressResponse(&suppressResponse); diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index 0fa98b02b6e7dc..f45b8b1448cc2e 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -447,6 +447,14 @@ class ReadClient : public Messaging::ExchangeDelegate SubscriptionActive, ///< The client is maintaining subscription }; + enum class ReportType + { + // kUnsolicited reports are the first message in an exchange. + kUnsolicited, + // kContinuingTransaction reports are responses to a message we sent. + kContinuingTransaction + }; + bool IsMatchingSubscriptionId(SubscriptionId aSubscriptionId) { return aSubscriptionId == mSubscriptionId && mInteractionType == InteractionType::Subscribe; @@ -486,7 +494,7 @@ class ReadClient : public Messaging::ExchangeDelegate void CancelResubscribeTimer(); void MoveToState(const ClientState aTargetState); CHIP_ERROR ProcessAttributePath(AttributePathIB::Parser & aAttributePath, ConcreteDataAttributePath & aClusterInfo); - CHIP_ERROR ProcessReportData(System::PacketBufferHandle && aPayload); + CHIP_ERROR ProcessReportData(System::PacketBufferHandle && aPayload, ReportType aReportType); const char * GetStateStr() const; /* diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 80ad1ded379b0c..2b61dded83b576 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -133,9 +133,7 @@ function(chip_configure_data_model APP_TARGET) ${CHIP_APP_BASE_DIR}/util/attribute-storage.cpp ${CHIP_APP_BASE_DIR}/util/attribute-table.cpp ${CHIP_APP_BASE_DIR}/util/binding-table.cpp - # Disable CM cluster table tests until update is done - # https://github.com/project-chip/connectedhomeip/issues/24425 - # ${CHIP_APP_BASE_DIR}/util/ClientMonitoringRegistrationTable.cpp + ${CHIP_APP_BASE_DIR}/util/IcdMonitoringTable.cpp ${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp ${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp ${CHIP_APP_BASE_DIR}/util/error-mapping.cpp diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 48dfa7da9428b2..7d90aab90698eb 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -164,9 +164,9 @@ template("chip_data_model") { "${_app_root}/clusters/scenes-server/SceneTable.h", "${_app_root}/clusters/scenes-server/SceneTableImpl.h", "${_app_root}/clusters/scenes-server/scenes-server.h", - "${_app_root}/util/ClientMonitoringRegistrationTable.cpp", - "${_app_root}/util/ClientMonitoringRegistrationTable.h", "${_app_root}/util/DataModelHandler.cpp", + "${_app_root}/util/IcdMonitoringTable.cpp", + "${_app_root}/util/IcdMonitoringTable.h", "${_app_root}/util/attribute-size-util.cpp", "${_app_root}/util/attribute-storage.cpp", "${_app_root}/util/attribute-table.cpp", diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 6a9e7db0e8161e..6e66018e8d43ea 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -358,6 +358,12 @@ bool ColorControlServer::computeNewColor16uValue(ColorControlServer::Color16uTra (p->stepsRemaining)--; + if (p->timeRemaining > 0) + { + // The time remaining is measured in tenths of a second, which is the same as the update timer. + (p->timeRemaining)--; + } + // handle sign if (p->finalValue == p->currentValue) { @@ -625,6 +631,7 @@ void ColorControlServer::startColorLoop(EndpointId endpoint, uint8_t startFromSt colorHueTransitionState->stepsRemaining = static_cast(time * TRANSITION_TIME_1S); colorHueTransitionState->stepsTotal = static_cast(time * TRANSITION_TIME_1S); + colorHueTransitionState->timeRemaining = MAX_INT16U_VALUE; colorHueTransitionState->endpoint = endpoint; Attributes::RemainingTime::Set(endpoint, MAX_INT16U_VALUE); @@ -640,6 +647,7 @@ void ColorControlServer::initHueTransitionState(EndpointId endpoint, ColorHueTra bool isEnhancedHue) { colorHueTransitionState->stepsRemaining = 0; + colorHueTransitionState->timeRemaining = 0; colorHueTransitionState->isEnhancedHue = isEnhancedHue; colorHueTransitionState->endpoint = endpoint; @@ -662,6 +670,7 @@ void ColorControlServer::initHueTransitionState(EndpointId endpoint, ColorHueTra void ColorControlServer::initSaturationTransitionState(chip::EndpointId endpoint, Color16uTransitionState * colorSatTransitionState) { colorSatTransitionState->stepsRemaining = 0; + colorSatTransitionState->timeRemaining = 0; colorSatTransitionState->endpoint = endpoint; colorSatTransitionState->initialValue = colorSatTransitionState->currentValue = getSaturation(endpoint); @@ -675,8 +684,7 @@ void ColorControlServer::SetHSVRemainingTime(chip::EndpointId endpoint) // When the hue transition is loop, RemainingTime stays at MAX_INT16 if (hueTransitionState->repeat == false) { - Attributes::RemainingTime::Set(endpoint, - max(hueTransitionState->stepsRemaining, saturationTransitionState->stepsRemaining)); + Attributes::RemainingTime::Set(endpoint, max(hueTransitionState->timeRemaining, saturationTransitionState->timeRemaining)); } } @@ -700,6 +708,12 @@ bool ColorControlServer::computeNewHueValue(ColorControlServer::ColorHueTransiti (p->stepsRemaining)--; + if (p->timeRemaining > 0 && p->repeat == false) + { + // The time remaining is measured in tenths of a second, which is the same as the update timer. + (p->timeRemaining)--; + } + // are we going up or down? if ((p->isEnhancedHue && p->finalEnhancedHue == p->currentEnhancedHue) || (!p->isEnhancedHue && p->finalHue == p->currentHue)) { @@ -925,6 +939,7 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const colorHueTransitionState->stepsRemaining = TRANSITION_TIME_1S; colorHueTransitionState->stepsTotal = TRANSITION_TIME_1S; + colorHueTransitionState->timeRemaining = MAX_INT16U_VALUE; colorHueTransitionState->endpoint = endpoint; colorHueTransitionState->repeat = true; @@ -987,11 +1002,6 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons currentHue = static_cast(current8bitHue); } - if (transitionTime == 0) - { - transitionTime++; - } - // Convert the ShortestDistance/LongestDistance moveDirection values into Up/Down. switch (moveDirection) { @@ -1059,8 +1069,9 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons colorHueTransitionState->finalHue = static_cast(hue); } - colorHueTransitionState->stepsRemaining = transitionTime; - colorHueTransitionState->stepsTotal = transitionTime; + colorHueTransitionState->stepsRemaining = max(transitionTime, 1); + colorHueTransitionState->stepsTotal = colorHueTransitionState->stepsRemaining; + colorHueTransitionState->timeRemaining = transitionTime; colorHueTransitionState->endpoint = endpoint; colorHueTransitionState->up = (direction == HueDirection::kUp); colorHueTransitionState->repeat = false; @@ -1068,7 +1079,7 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons SetHSVRemainingTime(endpoint); // kick off the state machine: - scheduleTimerCallbackMs(configureHSVEventControl(endpoint), UPDATE_TIME_MS); + scheduleTimerCallbackMs(configureHSVEventControl(endpoint), transitionTime ? UPDATE_TIME_MS : 0); exit: commandObj->AddStatus(commandPath, status); @@ -1121,11 +1132,6 @@ bool ColorControlServer::moveToHueAndSaturationCommand(app::CommandHandler * com return true; } - if (transitionTime == 0) - { - transitionTime++; - } - // New command. Need to stop any active transitions. stopAllColorTransitions(endpoint); @@ -1164,15 +1170,17 @@ bool ColorControlServer::moveToHueAndSaturationCommand(app::CommandHandler * com } colorHueTransitionState->up = moveUp; - colorHueTransitionState->stepsRemaining = transitionTime; - colorHueTransitionState->stepsTotal = transitionTime; + colorHueTransitionState->stepsRemaining = max(transitionTime, 1); + colorHueTransitionState->stepsTotal = colorHueTransitionState->stepsRemaining; + colorHueTransitionState->timeRemaining = transitionTime; colorHueTransitionState->endpoint = endpoint; colorHueTransitionState->repeat = false; initSaturationTransitionState(endpoint, colorSaturationTransitionState); colorSaturationTransitionState->finalValue = saturation; - colorSaturationTransitionState->stepsRemaining = transitionTime; - colorSaturationTransitionState->stepsTotal = transitionTime; + colorSaturationTransitionState->stepsRemaining = colorHueTransitionState->stepsRemaining; + colorSaturationTransitionState->stepsTotal = colorHueTransitionState->stepsRemaining; + colorSaturationTransitionState->timeRemaining = transitionTime; colorSaturationTransitionState->endpoint = endpoint; colorSaturationTransitionState->lowLimit = MIN_SATURATION_VALUE; colorSaturationTransitionState->highLimit = MAX_SATURATION_VALUE; @@ -1180,7 +1188,7 @@ bool ColorControlServer::moveToHueAndSaturationCommand(app::CommandHandler * com SetHSVRemainingTime(endpoint); // kick off the state machine: - scheduleTimerCallbackMs(configureHSVEventControl(endpoint), UPDATE_TIME_MS); + scheduleTimerCallbackMs(configureHSVEventControl(endpoint), transitionTime ? UPDATE_TIME_MS : 0); exit: commandObj->AddStatus(commandPath, status); @@ -1225,11 +1233,6 @@ bool ColorControlServer::stepHueCommand(app::CommandHandler * commandObj, const return true; } - if (transitionTime == 0) - { - transitionTime++; - } - // New command. Need to stop any active transitions. stopAllColorTransitions(endpoint); @@ -1274,15 +1277,16 @@ bool ColorControlServer::stepHueCommand(app::CommandHandler * commandObj, const } } - colorHueTransitionState->stepsRemaining = transitionTime; - colorHueTransitionState->stepsTotal = transitionTime; + colorHueTransitionState->stepsRemaining = max(transitionTime, 1); + colorHueTransitionState->stepsTotal = colorHueTransitionState->stepsRemaining; + colorHueTransitionState->timeRemaining = transitionTime; colorHueTransitionState->endpoint = endpoint; colorHueTransitionState->repeat = false; SetHSVRemainingTime(endpoint); // kick off the state machine: - scheduleTimerCallbackMs(configureHSVEventControl(endpoint), UPDATE_TIME_MS); + scheduleTimerCallbackMs(configureHSVEventControl(endpoint), transitionTime ? UPDATE_TIME_MS : 0); exit: commandObj->AddStatus(commandPath, status); @@ -1348,6 +1352,7 @@ bool ColorControlServer::moveSaturationCommand(app::CommandHandler * commandObj, colorSaturationTransitionState->stepsRemaining = transitionTime; colorSaturationTransitionState->stepsTotal = transitionTime; + colorSaturationTransitionState->timeRemaining = transitionTime; colorSaturationTransitionState->endpoint = endpoint; colorSaturationTransitionState->lowLimit = MIN_SATURATION_VALUE; colorSaturationTransitionState->highLimit = MAX_SATURATION_VALUE; @@ -1399,11 +1404,6 @@ bool ColorControlServer::moveToSaturationCommand(app::CommandHandler * commandOb return true; } - if (transitionTime == 0) - { - transitionTime++; - } - // New command. Need to stop any active transitions. stopAllColorTransitions(endpoint); @@ -1413,8 +1413,9 @@ bool ColorControlServer::moveToSaturationCommand(app::CommandHandler * commandOb // now, kick off the state machine. initSaturationTransitionState(endpoint, colorSaturationTransitionState); colorSaturationTransitionState->finalValue = saturation; - colorSaturationTransitionState->stepsRemaining = transitionTime; - colorSaturationTransitionState->stepsTotal = transitionTime; + colorSaturationTransitionState->stepsRemaining = max(transitionTime, 1); + colorSaturationTransitionState->stepsTotal = colorSaturationTransitionState->stepsRemaining; + colorSaturationTransitionState->timeRemaining = transitionTime; colorSaturationTransitionState->endpoint = endpoint; colorSaturationTransitionState->lowLimit = MIN_SATURATION_VALUE; colorSaturationTransitionState->highLimit = MAX_SATURATION_VALUE; @@ -1422,7 +1423,7 @@ bool ColorControlServer::moveToSaturationCommand(app::CommandHandler * commandOb SetHSVRemainingTime(endpoint); // kick off the state machine: - scheduleTimerCallbackMs(configureHSVEventControl(endpoint), UPDATE_TIME_MS); + scheduleTimerCallbackMs(configureHSVEventControl(endpoint), transitionTime ? UPDATE_TIME_MS : 0); exit: commandObj->AddStatus(commandPath, status); @@ -1457,11 +1458,6 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj, return true; } - if (transitionTime == 0) - { - transitionTime++; - } - // New command. Need to stop any active transitions. stopAllColorTransitions(endpoint); @@ -1480,8 +1476,9 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj, { colorSaturationTransitionState->finalValue = subtractSaturation(currentSaturation, stepSize); } - colorSaturationTransitionState->stepsRemaining = transitionTime; - colorSaturationTransitionState->stepsTotal = transitionTime; + colorSaturationTransitionState->stepsRemaining = max(transitionTime, 1); + colorSaturationTransitionState->stepsTotal = colorSaturationTransitionState->stepsRemaining; + colorSaturationTransitionState->timeRemaining = transitionTime; colorSaturationTransitionState->endpoint = endpoint; colorSaturationTransitionState->lowLimit = MIN_SATURATION_VALUE; colorSaturationTransitionState->highLimit = MAX_SATURATION_VALUE; @@ -1489,7 +1486,7 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj, SetHSVRemainingTime(endpoint); // kick off the state machine: - scheduleTimerCallbackMs(configureHSVEventControl(endpoint), UPDATE_TIME_MS); + scheduleTimerCallbackMs(configureHSVEventControl(endpoint), transitionTime ? UPDATE_TIME_MS : 0); exit: commandObj->AddStatus(commandPath, status); @@ -1777,11 +1774,6 @@ bool ColorControlServer::moveToColorCommand(app::CommandHandler * commandObj, co return true; } - if (transitionTime == 0) - { - transitionTime++; - } - // New command. Need to stop any active transitions. stopAllColorTransitions(endpoint); @@ -1792,8 +1784,9 @@ bool ColorControlServer::moveToColorCommand(app::CommandHandler * commandObj, co Attributes::CurrentX::Get(endpoint, &(colorXTransitionState->initialValue)); Attributes::CurrentX::Get(endpoint, &(colorXTransitionState->currentValue)); colorXTransitionState->finalValue = colorX; - colorXTransitionState->stepsRemaining = transitionTime; - colorXTransitionState->stepsTotal = transitionTime; + colorXTransitionState->stepsRemaining = max(transitionTime, 1); + colorXTransitionState->stepsTotal = colorXTransitionState->stepsRemaining; + colorXTransitionState->timeRemaining = transitionTime; colorXTransitionState->endpoint = endpoint; colorXTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorXTransitionState->highLimit = MAX_CIE_XY_VALUE; @@ -1801,8 +1794,9 @@ bool ColorControlServer::moveToColorCommand(app::CommandHandler * commandObj, co Attributes::CurrentY::Get(endpoint, &(colorYTransitionState->initialValue)); Attributes::CurrentY::Get(endpoint, &(colorYTransitionState->currentValue)); colorYTransitionState->finalValue = colorY; - colorYTransitionState->stepsRemaining = transitionTime; - colorYTransitionState->stepsTotal = transitionTime; + colorYTransitionState->stepsRemaining = colorXTransitionState->stepsRemaining; + colorYTransitionState->stepsTotal = colorXTransitionState->stepsRemaining; + colorYTransitionState->timeRemaining = transitionTime; colorYTransitionState->endpoint = endpoint; colorYTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorYTransitionState->highLimit = MAX_CIE_XY_VALUE; @@ -1810,7 +1804,7 @@ bool ColorControlServer::moveToColorCommand(app::CommandHandler * commandObj, co Attributes::RemainingTime::Set(endpoint, transitionTime); // kick off the state machine: - scheduleTimerCallbackMs(configureXYEventControl(endpoint), UPDATE_TIME_MS); + scheduleTimerCallbackMs(configureXYEventControl(endpoint), transitionTime ? UPDATE_TIME_MS : 0); exit: commandObj->AddStatus(commandPath, status); @@ -1870,6 +1864,7 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons transitionTimeX = computeTransitionTimeFromStateAndRate(colorXTransitionState, unsignedRate); colorXTransitionState->stepsRemaining = transitionTimeX; colorXTransitionState->stepsTotal = transitionTimeX; + colorXTransitionState->timeRemaining = transitionTimeX; colorXTransitionState->endpoint = endpoint; colorXTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorXTransitionState->highLimit = MAX_CIE_XY_VALUE; @@ -1889,6 +1884,7 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons transitionTimeY = computeTransitionTimeFromStateAndRate(colorYTransitionState, unsignedRate); colorYTransitionState->stepsRemaining = transitionTimeY; colorYTransitionState->stepsTotal = transitionTimeY; + colorYTransitionState->timeRemaining = transitionTimeY; colorYTransitionState->endpoint = endpoint; colorYTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorYTransitionState->highLimit = MAX_CIE_XY_VALUE; @@ -1944,11 +1940,6 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons colorX = findNewColorValueFromStep(currentColorX, stepX); colorY = findNewColorValueFromStep(currentColorY, stepY); - if (transitionTime == 0) - { - transitionTime++; - } - // New command. Need to stop any active transitions. stopAllColorTransitions(endpoint); @@ -1959,8 +1950,9 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons colorXTransitionState->initialValue = currentColorX; colorXTransitionState->currentValue = currentColorX; colorXTransitionState->finalValue = colorX; - colorXTransitionState->stepsRemaining = transitionTime; - colorXTransitionState->stepsTotal = transitionTime; + colorXTransitionState->stepsRemaining = max(transitionTime, 1); + colorXTransitionState->stepsTotal = colorXTransitionState->stepsRemaining; + colorXTransitionState->timeRemaining = transitionTime; colorXTransitionState->endpoint = endpoint; colorXTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorXTransitionState->highLimit = MAX_CIE_XY_VALUE; @@ -1968,8 +1960,9 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons colorYTransitionState->initialValue = currentColorY; colorYTransitionState->currentValue = currentColorY; colorYTransitionState->finalValue = colorY; - colorYTransitionState->stepsRemaining = transitionTime; - colorYTransitionState->stepsTotal = transitionTime; + colorYTransitionState->stepsRemaining = colorXTransitionState->stepsRemaining; + colorYTransitionState->stepsTotal = colorXTransitionState->stepsRemaining; + colorYTransitionState->timeRemaining = transitionTime; colorYTransitionState->endpoint = endpoint; colorYTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorYTransitionState->highLimit = MAX_CIE_XY_VALUE; @@ -1977,7 +1970,7 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons Attributes::RemainingTime::Set(endpoint, transitionTime); // kick off the state machine: - scheduleTimerCallbackMs(configureXYEventControl(endpoint), UPDATE_TIME_MS); + scheduleTimerCallbackMs(configureXYEventControl(endpoint), transitionTime ? UPDATE_TIME_MS : 0); exit: commandObj->AddStatus(commandPath, status); @@ -1999,7 +1992,7 @@ void ColorControlServer::updateXYCommand(EndpointId endpoint) isXTransitionDone = computeNewColor16uValue(colorXTransitionState); isYTransitionDone = computeNewColor16uValue(colorYTransitionState); - Attributes::RemainingTime::Set(endpoint, max(colorXTransitionState->stepsRemaining, colorYTransitionState->stepsRemaining)); + Attributes::RemainingTime::Set(endpoint, max(colorXTransitionState->timeRemaining, colorYTransitionState->timeRemaining)); if (isXTransitionDone && isYTransitionDone) { @@ -2062,11 +2055,6 @@ Status ColorControlServer::moveToColorTemp(EndpointId aEndpoint, uint16_t colorT uint16_t temperatureMax = MAX_TEMPERATURE_VALUE; Attributes::ColorTempPhysicalMaxMireds::Get(endpoint, &temperatureMax); - if (transitionTime == 0) - { - transitionTime++; - } - // New command. Need to stop any active transitions. stopAllColorTransitions(endpoint); @@ -2088,14 +2076,15 @@ Status ColorControlServer::moveToColorTemp(EndpointId aEndpoint, uint16_t colorT Attributes::ColorTemperatureMireds::Get(endpoint, &(colorTempTransitionState->currentValue)); colorTempTransitionState->finalValue = colorTemperature; - colorTempTransitionState->stepsRemaining = transitionTime; - colorTempTransitionState->stepsTotal = transitionTime; + colorTempTransitionState->stepsRemaining = max(transitionTime, 1); + colorTempTransitionState->stepsTotal = colorTempTransitionState->stepsRemaining; + colorTempTransitionState->timeRemaining = transitionTime; colorTempTransitionState->endpoint = endpoint; colorTempTransitionState->lowLimit = temperatureMin; colorTempTransitionState->highLimit = temperatureMax; // kick off the state machine - scheduleTimerCallbackMs(configureTempEventControl(endpoint), UPDATE_TIME_MS); + scheduleTimerCallbackMs(configureTempEventControl(endpoint), transitionTime ? UPDATE_TIME_MS : 0); return Status::Success; } @@ -2201,7 +2190,7 @@ void ColorControlServer::updateTempCommand(EndpointId endpoint) isColorTempTransitionDone = computeNewColor16uValue(colorTempTransitionState); - Attributes::RemainingTime::Set(endpoint, colorTempTransitionState->stepsRemaining); + Attributes::RemainingTime::Set(endpoint, colorTempTransitionState->timeRemaining); if (isColorTempTransitionDone) { @@ -2316,6 +2305,7 @@ bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj, transitionTime = computeTransitionTimeFromStateAndRate(colorTempTransitionState, rate); colorTempTransitionState->stepsRemaining = transitionTime; colorTempTransitionState->stepsTotal = transitionTime; + colorTempTransitionState->timeRemaining = transitionTime; colorTempTransitionState->endpoint = endpoint; colorTempTransitionState->lowLimit = colorTemperatureMinimum; colorTempTransitionState->highLimit = colorTemperatureMaximum; @@ -2388,11 +2378,6 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj, Attributes::ColorTempPhysicalMinMireds::Get(endpoint, &tempPhysicalMin); Attributes::ColorTempPhysicalMaxMireds::Get(endpoint, &tempPhysicalMax); - if (transitionTime == 0) - { - transitionTime++; - } - if (colorTemperatureMinimum < tempPhysicalMin) { colorTemperatureMinimum = tempPhysicalMin; @@ -2434,8 +2419,9 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj, colorTempTransitionState->finalValue = static_cast(finalValue32u); } } - colorTempTransitionState->stepsRemaining = transitionTime; - colorTempTransitionState->stepsTotal = transitionTime; + colorTempTransitionState->stepsRemaining = max(transitionTime, 1); + colorTempTransitionState->stepsTotal = colorTempTransitionState->stepsRemaining; + colorTempTransitionState->timeRemaining = transitionTime; colorTempTransitionState->endpoint = endpoint; colorTempTransitionState->lowLimit = colorTemperatureMinimum; colorTempTransitionState->highLimit = colorTemperatureMaximum; @@ -2443,7 +2429,7 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj, Attributes::RemainingTime::Set(endpoint, transitionTime); // kick off the state machine: - scheduleTimerCallbackMs(configureTempEventControl(endpoint), UPDATE_TIME_MS); + scheduleTimerCallbackMs(configureTempEventControl(endpoint), transitionTime ? UPDATE_TIME_MS : 0); exit: commandObj->AddStatus(commandPath, status); diff --git a/src/app/clusters/color-control-server/color-control-server.h b/src/app/clusters/color-control-server/color-control-server.h index 5f73e6a37475e3..cc3c03fa5e8e70 100644 --- a/src/app/clusters/color-control-server/color-control-server.h +++ b/src/app/clusters/color-control-server/color-control-server.h @@ -102,6 +102,9 @@ class ColorControlServer uint8_t finalHue; uint16_t stepsRemaining; uint16_t stepsTotal; + // The amount of time remaining until the transition completes. Measured in tenths of a second. + // When the transition repeats indefinitely, this will hold the maximum value possible. + uint16_t timeRemaining; uint16_t initialEnhancedHue; uint16_t currentEnhancedHue; uint16_t finalEnhancedHue; @@ -118,6 +121,8 @@ class ColorControlServer uint16_t finalValue; uint16_t stepsRemaining; uint16_t stepsTotal; + // The amount of time remaining until the transition completes. Measured in tenths of a second. + uint16_t timeRemaining; uint16_t lowLimit; uint16_t highLimit; chip::EndpointId endpoint; diff --git a/src/app/clusters/icd-management-server/icd-management-server.cpp b/src/app/clusters/icd-management-server/icd-management-server.cpp index 0855514da8449a..8062aa7e06dab2 100644 --- a/src/app/clusters/icd-management-server/icd-management-server.cpp +++ b/src/app/clusters/icd-management-server/icd-management-server.cpp @@ -18,12 +18,15 @@ #include "icd-management-server.h" #include "app/server/Server.h" +#include +#include #include #include #include #include #include #include +#include #include #include @@ -32,8 +35,7 @@ using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::IcdManagement; using namespace Protocols; - -//============================================================================== +using namespace chip::Access; namespace { @@ -69,61 +71,199 @@ CHIP_ERROR IcdManagementAttributeAccess::Read(const ConcreteReadAttributePath & CHIP_ERROR IcdManagementAttributeAccess::ReadRegisteredClients(EndpointId endpoint, AttributeValueEncoder & encoder) { - return encoder.EncodeEmptyList(); + uint16_t supported_clients = 0; + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == Attributes::ClientsSupportedPerFabric::Get(endpoint, &supported_clients), + CHIP_ERROR_NOT_FOUND); + + return encoder.EncodeList([supported_clients](const auto & subEncoder) -> CHIP_ERROR { + IcdMonitoringEntry e; + + const auto & fabricTable = Server::GetInstance().GetFabricTable(); + for (const auto & fabricInfo : fabricTable) + { + PersistentStorageDelegate & storage = chip::Server::GetInstance().GetPersistentStorage(); + IcdMonitoringTable table(storage, fabricInfo.GetFabricIndex(), supported_clients); + for (uint16_t i = 0; i < table.Limit(); ++i) + { + CHIP_ERROR err = table.Get(i, e); + if (CHIP_ERROR_NOT_FOUND == err) + { + // No more entries in the table + break; + } + ReturnErrorOnFailure(err); + ReturnErrorOnFailure(subEncoder.Encode(e)); + } + } + return CHIP_NO_ERROR; + }); +} + +CHIP_ERROR CheckAdmin(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, bool & is_admin) +{ + RequestPath requestPath{ .cluster = commandPath.mClusterId, .endpoint = commandPath.mEndpointId }; + CHIP_ERROR err = GetAccessControl().Check(commandObj->GetSubjectDescriptor(), requestPath, Privilege::kAdminister); + if (CHIP_NO_ERROR == err) + { + is_admin = true; + } + else if (CHIP_ERROR_ACCESS_DENIED == err) + { + is_admin = false; + err = CHIP_NO_ERROR; + } + return err; } +class IcdManagementFabricDelegate : public chip::FabricTable::Delegate +{ + void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override + { + uint16_t supported_clients = 0; + if (EMBER_ZCL_STATUS_SUCCESS != Attributes::ClientsSupportedPerFabric::Get(kRootEndpointId, &supported_clients)) + { + // Fallback to maximum, the remove function will loop until no more entries are found. + supported_clients = UINT16_MAX; + } + IcdMonitoringTable table(chip::Server::GetInstance().GetPersistentStorage(), fabricIndex, supported_clients); + table.RemoveAll(); + } +}; + +IcdManagementFabricDelegate gFabricDelegate; IcdManagementAttributeAccess gAttribute; } // namespace -//============================================================================== - -InteractionModel::Status -IcdManagementServer::RegisterClient(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::IcdManagement::Commands::RegisterClient::DecodableType & commandData) +InteractionModel::Status IcdManagementServer::RegisterClient(chip::app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, + const Commands::RegisterClient::DecodableType & commandData) { - // TODO: Implementent logic for end device - return InteractionModel::Status::UnsupportedCommand; + uint16_t supported_clients = 0; + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == + Attributes::ClientsSupportedPerFabric::Get(commandPath.mEndpointId, &supported_clients), + InteractionModel::Status::Failure); + IcdMonitoringTable table(chip::Server::GetInstance().GetPersistentStorage(), commandObj->GetAccessingFabricIndex(), + supported_clients); + + // Get current entry, if exists + IcdMonitoringEntry entry; + CHIP_ERROR err = table.Find(commandData.checkInNodeID, entry); + if (CHIP_NO_ERROR == err) + { + // Existing entry: Validate Key if, and only if, the ISD has NOT administrator permissions + bool is_admin = false; + err = CheckAdmin(commandObj, commandPath, is_admin); + VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); + if (!is_admin) + { + VerifyOrReturnError(commandData.verificationKey.HasValue(), InteractionModel::Status::Failure); + VerifyOrReturnError(commandData.verificationKey.Value().data_equal(entry.key), InteractionModel::Status::Failure); + } + } + else if (CHIP_ERROR_NOT_FOUND == err) + { + // New entry + VerifyOrReturnError(entry.index < table.Limit(), InteractionModel::Status::ResourceExhausted); + } + else + { + // Error + return InteractionModel::Status::Failure; + } + + // Save + entry.checkInNodeID = commandData.checkInNodeID; + entry.monitoredSubject = commandData.monitoredSubject; + entry.key = commandData.key; + err = table.Set(entry.index, entry); + VerifyOrReturnError(CHIP_ERROR_INVALID_ARGUMENT != err, InteractionModel::Status::ConstraintError); + VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); + + return InteractionModel::Status::Success; } -InteractionModel::Status IcdManagementServer::UnregisterClient( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::IcdManagement::Commands::UnregisterClient::DecodableType & commandData) +InteractionModel::Status IcdManagementServer::UnregisterClient(chip::app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, + const Commands::UnregisterClient::DecodableType & commandData) { - // TODO: Implementent logic for end device - return InteractionModel::Status::UnsupportedCommand; + uint16_t supported_clients = 0; + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == + Attributes::ClientsSupportedPerFabric::Get(commandPath.mEndpointId, &supported_clients), + InteractionModel::Status::Failure); + IcdMonitoringTable table(chip::Server::GetInstance().GetPersistentStorage(), commandObj->GetAccessingFabricIndex(), + supported_clients); + + // Get current entry, if exists + IcdMonitoringEntry entry; + CHIP_ERROR err = table.Find(commandData.checkInNodeID, entry); + VerifyOrReturnError(CHIP_ERROR_NOT_FOUND != err, InteractionModel::Status::NotFound); + VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); + + // Existing entry: Validate Key if, and only if, the ISD has NOT administrator permissions + bool is_admin = false; + err = CheckAdmin(commandObj, commandPath, is_admin); + VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); + + if (!is_admin) + { + VerifyOrReturnError(commandData.key.HasValue(), InteractionModel::Status::Failure); + VerifyOrReturnError(commandData.key.Value().data_equal(entry.key), InteractionModel::Status::Failure); + } + + err = table.Remove(entry.index); + VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); + + return InteractionModel::Status::Success; } InteractionModel::Status IcdManagementServer::StayActiveRequest(const chip::app::ConcreteCommandPath & commandPath) { - // TODO: Implementent logic for end device + + // TODO: Implementent stay awake logic for end device return InteractionModel::Status::UnsupportedCommand; } -//============================================================================== +void emberAfIcdManagementClusterInitCallback() +{ + Server::GetInstance().GetFabricTable().AddFabricDelegate(&gFabricDelegate); +} /** * @brief ICD Management Cluster RegisterClient Command callback (from client) * */ -bool emberAfIcdManagementClusterRegisterClientCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::IcdManagement::Commands::RegisterClient::DecodableType & commandData) +bool emberAfIcdManagementClusterRegisterClientCallback(chip::app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, + const Commands::RegisterClient::DecodableType & commandData) { IcdManagementServer server; + InteractionModel::Status status = server.RegisterClient(commandObj, commandPath, commandData); + if (InteractionModel::Status::Success == status) + { + // Response + IcdManagement::Commands::RegisterClientResponse::Type response; + if (EMBER_ZCL_STATUS_SUCCESS == Attributes::ICDCounter::Get(commandPath.mEndpointId, &response.ICDCounter)) + { + commandObj->AddResponse(commandPath, response); + return true; + } + status = InteractionModel::Status::Failure; + } + // Error commandObj->AddStatus(commandPath, status); return true; } /** - * @brief ICD Management Cluster UnregisterClient Command callback (from client) + * @brief ICD Management Cluster UregisterClient Command callback (from client) * */ -bool emberAfIcdManagementClusterUnregisterClientCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::IcdManagement::Commands::UnregisterClient::DecodableType & commandData) +bool emberAfIcdManagementClusterUnregisterClientCallback(chip::app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, + const Commands::UnregisterClient::DecodableType & commandData) { IcdManagementServer server; InteractionModel::Status status = server.UnregisterClient(commandObj, commandPath, commandData); @@ -135,9 +275,9 @@ bool emberAfIcdManagementClusterUnregisterClientCallback( /** * @brief ICD Management Cluster StayActiveRequest Command callback (from client) */ -bool emberAfIcdManagementClusterStayActiveRequestCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::DecodableType & commandData) +bool emberAfIcdManagementClusterStayActiveRequestCallback(chip::app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, + const Commands::StayActiveRequest::DecodableType & commandData) { IcdManagementServer server; InteractionModel::Status status = server.StayActiveRequest(commandPath); diff --git a/src/app/clusters/ota-provider/ota-provider.cpp b/src/app/clusters/ota-provider/ota-provider.cpp index 18490ede5d71d2..6b353073a829dc 100644 --- a/src/app/clusters/ota-provider/ota-provider.cpp +++ b/src/app/clusters/ota-provider/ota-provider.cpp @@ -47,6 +47,7 @@ using Protocols::InteractionModel::Status; static constexpr size_t kOtaProviderDelegateTableSize = EMBER_AF_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; +static_assert(kOtaProviderDelegateTableSize <= kEmberInvalidEndpointIndex, "OtaProvider Delegate table size error"); namespace { constexpr size_t kLocationLen = 2; // The expected length of the location parameter in QueryImage @@ -58,8 +59,9 @@ OTAProviderDelegate * gDelegateTable[kOtaProviderDelegateTableSize] = { nullptr OTAProviderDelegate * GetDelegate(EndpointId endpoint) { - uint16_t ep = emberAfFindClusterServerEndpointIndex(endpoint, OtaSoftwareUpdateProvider::Id); - return (ep == 0xFFFF ? nullptr : gDelegateTable[ep]); + uint16_t ep = emberAfGetClusterServerEndpointIndex(endpoint, OtaSoftwareUpdateProvider::Id, + EMBER_AF_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT); + return (ep >= kOtaProviderDelegateTableSize ? nullptr : gDelegateTable[ep]); } bool SendStatusIfDelegateNull(app::CommandHandler * commandObj, const app::ConcreteCommandPath & path) @@ -226,8 +228,9 @@ namespace OTAProvider { void SetDelegate(EndpointId endpoint, OTAProviderDelegate * delegate) { - uint16_t ep = emberAfFindClusterServerEndpointIndex(endpoint, OtaSoftwareUpdateProvider::Id); - if (ep != 0xFFFF) + uint16_t ep = emberAfGetClusterServerEndpointIndex(endpoint, OtaSoftwareUpdateProvider::Id, + EMBER_AF_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT); + if (ep < kOtaProviderDelegateTableSize) { gDelegateTable[ep] = delegate; } diff --git a/src/app/clusters/scenes-server/SceneTableImpl.cpp b/src/app/clusters/scenes-server/SceneTableImpl.cpp index f0b5131f033776..f4e3de33d94634 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.cpp +++ b/src/app/clusters/scenes-server/SceneTableImpl.cpp @@ -737,11 +737,14 @@ CHIP_ERROR DefaultSceneTableImpl::SceneSaveEFS(SceneTableEntry & scene) { if (!HandlerListEmpty()) { - uint8_t clusterCount = 0; - clusterId cArray[kMaxClustersPerScene]; - Span cSpan(cArray); - clusterCount = GetClustersFromEndpoint(cArray, kMaxClustersPerScene); - cSpan.reduce_size(clusterCount); + // TODO : Once zap supports the scenable quality, implement a GetSceneableClusterCountFromEndpointType function to avoid + // over-allocation + uint8_t clusterCount = GetClusterCountFromEndpoint(); + chip::Platform::ScopedMemoryBuffer cBuffer; + VerifyOrReturnError(cBuffer.Calloc(clusterCount), CHIP_ERROR_NO_MEMORY); + clusterCount = GetClustersFromEndpoint(cBuffer.Get(), clusterCount); + + Span cSpan(cBuffer.Get(), clusterCount); for (clusterId cluster : cSpan) { ExtensionFieldSet EFS; @@ -836,6 +839,14 @@ uint8_t DefaultSceneTableImpl::GetClustersFromEndpoint(ClusterId * clusterList, return emberAfGetClustersFromEndpoint(mEndpointId, clusterList, listLen, true); } +/// @brief wrapper function around emberAfGetClusterCountForEndpoint to allow testing enforcing a specific count, shimmed in test +/// configuration because emberAfGetClusterCountForEndpoint relies on , which relies on zap generated +/// files +uint8_t DefaultSceneTableImpl::GetClusterCountFromEndpoint() +{ + return emberAfGetClusterCountForEndpoint(mEndpointId); +} + void DefaultSceneTableImpl::SetEndpoint(EndpointId endpoint) { mEndpointId = endpoint; diff --git a/src/app/clusters/scenes-server/SceneTableImpl.h b/src/app/clusters/scenes-server/SceneTableImpl.h index 7298f60a310e79..b70a50ba1e8155 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.h +++ b/src/app/clusters/scenes-server/SceneTableImpl.h @@ -204,6 +204,9 @@ class DefaultSceneTableImpl : public SceneTable // wrapper function around emberAfGetClustersFromEndpoint to allow override when testing virtual uint8_t GetClustersFromEndpoint(ClusterId * clusterList, uint8_t listLen); + // wrapper function around emberAfGetClusterCountForEndpoint to allow override when testing + virtual uint8_t GetClusterCountFromEndpoint(); + class SceneEntryIteratorImpl : public SceneEntryIterator { public: diff --git a/src/app/clusters/scenes-server/scenes-server.cpp b/src/app/clusters/scenes-server/scenes-server.cpp index f55e06feb611a7..3655b0d087760b 100644 --- a/src/app/clusters/scenes-server/scenes-server.cpp +++ b/src/app/clusters/scenes-server/scenes-server.cpp @@ -110,7 +110,7 @@ CHIP_ERROR ScenesServer::Init() VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE); mGroupProvider = Credentials::GetGroupDataProvider(); - scenes::SceneTable * sceneTable = scenes::GetSceneTableImpl(); + SceneTable * sceneTable = scenes::GetSceneTableImpl(); ReturnErrorOnFailure(sceneTable->Init(&chip::Server::GetInstance().GetPersistentStorage())); for (auto endpoint : EnabledEndpointsWithServerCluster(Id)) @@ -143,7 +143,7 @@ void ScenesServer::Shutdown() { chip::app::InteractionModelEngine::GetInstance()->UnregisterCommandHandler(this); - scenes::SceneTable * sceneTable = scenes::GetSceneTableImpl(); + SceneTable * sceneTable = scenes::GetSceneTableImpl(); sceneTable->Finish(); mGroupProvider = nullptr; mIsInitialized = false; @@ -159,8 +159,7 @@ void AddSceneParse(CommandHandlerInterface::HandlerContext & ctx, const CommandD AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize))); // Get Scene Table Instance - scenes::SceneTable * sceneTable = - scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); + SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); // Response data response.groupID = req.groupID; @@ -270,8 +269,7 @@ void ViewSceneParse(HandlerContext & ctx, const CommandData & req, GroupDataProv AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize))); // Get Scene Table Instance - scenes::SceneTable * sceneTable = - scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); + SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); // Response data response.groupID = req.groupID; @@ -347,7 +345,7 @@ CHIP_ERROR StoreSceneParse(const FabricIndex & fabricIdx, const EndpointId & end StatusIB(ToInteractionModelStatus(Attributes::SceneTableSize::Get(endpointID, &endpointTableSize))).ToChipError()); // Get Scene Table Instance - scenes::SceneTable * sceneTable = scenes::GetSceneTableImpl(endpointID, endpointTableSize); + SceneTable * sceneTable = scenes::GetSceneTableImpl(endpointID, endpointTableSize); // Verify Endpoint in group VerifyOrReturnError(nullptr != groupProvider, CHIP_ERROR_INTERNAL); @@ -400,7 +398,7 @@ CHIP_ERROR RecallSceneParse(const FabricIndex & fabricIdx, const EndpointId & en StatusIB(ToInteractionModelStatus(Attributes::SceneTableSize::Get(endpointID, &endpointTableSize))).ToChipError()); // Get Scene Table Instance - scenes::SceneTable * sceneTable = scenes::GetSceneTableImpl(endpointID, endpointTableSize); + SceneTable * sceneTable = scenes::GetSceneTableImpl(endpointID, endpointTableSize); // Verify Endpoint in group VerifyOrReturnError(nullptr != groupProvider, CHIP_ERROR_INTERNAL); @@ -491,7 +489,7 @@ CHIP_ERROR ScenesServer::Read(const ConcreteReadAttributePath & aPath, Attribute StatusIB(ToInteractionModelStatus(Attributes::SceneTableSize::Get(aPath.mEndpointId, &endpointTableSize))).ToChipError()); // Get Scene Table Instance - scenes::SceneTable * sceneTable; + SceneTable * sceneTable; switch (aPath.mAttributeId) { @@ -511,7 +509,7 @@ CHIP_ERROR ScenesServer::Read(const ConcreteReadAttributePath & aPath, Attribute void ScenesServer::GroupWillBeRemoved(FabricIndex aFabricIx, EndpointId aEndpointId, GroupId aGroupId) { // Get Scene Table Instance - scenes::SceneTable * sceneTable = scenes::GetSceneTableImpl(aEndpointId); + SceneTable * sceneTable = scenes::GetSceneTableImpl(aEndpointId); VerifyOrReturn(nullptr != sceneTable); MakeSceneInvalid(aEndpointId); @@ -568,8 +566,7 @@ void ScenesServer::HandleRemoveScene(HandlerContext & ctx, const Commands::Remov AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize))); // Get Scene Table Instance - scenes::SceneTable * sceneTable = - scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); + SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); // Response data response.groupID = req.groupID; @@ -616,8 +613,7 @@ void ScenesServer::HandleRemoveAllScenes(HandlerContext & ctx, const Commands::R AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize))); // Get Scene Table Instance - scenes::SceneTable * sceneTable = - scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); + SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); // Response data response.groupID = req.groupID; @@ -706,8 +702,7 @@ void ScenesServer::HandleGetSceneMembership(HandlerContext & ctx, const Commands AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize))); // Get Scene Table Instance - scenes::SceneTable * sceneTable = - scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); + SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); // Response data response.groupID = req.groupID; @@ -762,8 +757,7 @@ void ScenesServer::HandleCopyScene(HandlerContext & ctx, const Commands::CopySce AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize))); // Get Scene Table Instance - scenes::SceneTable * sceneTable = - scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); + SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize); // Response data response.groupIdentifierFrom = req.groupIdentifierFrom; diff --git a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp new file mode 100644 index 00000000000000..733cead11265ac --- /dev/null +++ b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp @@ -0,0 +1,458 @@ +/** + * + * 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. + */ + +/** + * @file + * Routines for the Smoke CO Alarm Server plugin. + * + */ + +#include "smoke-co-alarm-server.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::DataModel; +using namespace chip::app::Clusters::SmokeCoAlarm; +using chip::Protocols::InteractionModel::Status; + +SmokeCoAlarmServer SmokeCoAlarmServer::sInstance; + +/********************************************************** + * SmokeCoAlarmServer public methods + *********************************************************/ + +SmokeCoAlarmServer & SmokeCoAlarmServer::Instance() +{ + return sInstance; +} + +bool SmokeCoAlarmServer::SetExpressedState(EndpointId endpointId, ExpressedStateEnum newExpressedState) +{ + ExpressedStateEnum expressedState; + bool success = GetAttribute(endpointId, Attributes::ExpressedState::Id, Attributes::ExpressedState::Get, expressedState); + + if (success && (expressedState != newExpressedState)) + { + success = SetAttribute(endpointId, Attributes::ExpressedState::Id, Attributes::ExpressedState::Set, newExpressedState); + + if (success && (newExpressedState == ExpressedStateEnum::kNormal)) + { + Events::AllClear::Type event{}; + SendEvent(endpointId, event); + } + } + + return success; +} + +bool SmokeCoAlarmServer::SetSmokeState(EndpointId endpointId, AlarmStateEnum newSmokeState) +{ + AlarmStateEnum smokeState; + bool success = GetAttribute(endpointId, Attributes::SmokeState::Id, Attributes::SmokeState::Get, smokeState); + + if (success && (smokeState != newSmokeState)) + { + success = SetAttribute(endpointId, Attributes::SmokeState::Id, Attributes::SmokeState::Set, newSmokeState); + + if (success && (newSmokeState == AlarmStateEnum::kWarning || newSmokeState == AlarmStateEnum::kCritical)) + { + Events::SmokeAlarm::Type event{}; + SendEvent(endpointId, event); + } + } + + return success; +} + +bool SmokeCoAlarmServer::SetCOState(EndpointId endpointId, AlarmStateEnum newCOState) +{ + AlarmStateEnum coState; + bool success = GetAttribute(endpointId, Attributes::COState::Id, Attributes::COState::Get, coState); + + if (success && (coState != newCOState)) + { + success = SetAttribute(endpointId, Attributes::COState::Id, Attributes::COState::Set, newCOState); + + if (success && (newCOState == AlarmStateEnum::kWarning || newCOState == AlarmStateEnum::kCritical)) + { + Events::COAlarm::Type event{}; + SendEvent(endpointId, event); + } + } + + return success; +} + +bool SmokeCoAlarmServer::SetBatteryAlert(EndpointId endpointId, AlarmStateEnum newBatteryAlert) +{ + AlarmStateEnum batteryAlert; + bool success = GetAttribute(endpointId, Attributes::BatteryAlert::Id, Attributes::BatteryAlert::Get, batteryAlert); + + if (success && (batteryAlert != newBatteryAlert)) + { + success = SetAttribute(endpointId, Attributes::BatteryAlert::Id, Attributes::BatteryAlert::Set, newBatteryAlert); + + if (success && (newBatteryAlert == AlarmStateEnum::kWarning || newBatteryAlert == AlarmStateEnum::kCritical)) + { + Events::LowBattery::Type event{}; + SendEvent(endpointId, event); + } + } + + return success; +} + +bool SmokeCoAlarmServer::SetDeviceMuted(EndpointId endpointId, MuteStateEnum newDeviceMuted) +{ + MuteStateEnum deviceMuted; + bool success = GetAttribute(endpointId, Attributes::DeviceMuted::Id, Attributes::DeviceMuted::Get, deviceMuted); + + if (success && (deviceMuted != newDeviceMuted)) + { + success = SetAttribute(endpointId, Attributes::DeviceMuted::Id, Attributes::DeviceMuted::Set, newDeviceMuted); + + if (success) + { + if (newDeviceMuted == MuteStateEnum::kMuted) + { + Events::AlarmMuted::Type event{}; + SendEvent(endpointId, event); + } + else if (newDeviceMuted == MuteStateEnum::kNotMuted) + { + Events::MuteEnded::Type event{}; + SendEvent(endpointId, event); + } + } + } + + return success; +} + +bool SmokeCoAlarmServer::SetTestInProgress(EndpointId endpointId, bool newTestInProgress) +{ + bool testInProgress; + bool success = GetAttribute(endpointId, Attributes::TestInProgress::Id, Attributes::TestInProgress::Get, testInProgress); + + if (success && (testInProgress != newTestInProgress)) + { + success = SetAttribute(endpointId, Attributes::TestInProgress::Id, Attributes::TestInProgress::Set, newTestInProgress); + + if (success && !newTestInProgress) + { + Events::SelfTestComplete::Type event{}; + SendEvent(endpointId, event); + } + } + + return success; +} + +bool SmokeCoAlarmServer::SetHardwareFaultAlert(EndpointId endpointId, bool newHardwareFaultAlert) +{ + bool hardwareFaultAlert; + bool success = + GetAttribute(endpointId, Attributes::HardwareFaultAlert::Id, Attributes::HardwareFaultAlert::Get, hardwareFaultAlert); + + if (success && (hardwareFaultAlert != newHardwareFaultAlert)) + { + success = SetAttribute(endpointId, Attributes::HardwareFaultAlert::Id, Attributes::HardwareFaultAlert::Set, + newHardwareFaultAlert); + + if (success && newHardwareFaultAlert) + { + Events::HardwareFault::Type event{}; + SendEvent(endpointId, event); + } + } + + return success; +} + +bool SmokeCoAlarmServer::SetEndOfServiceAlert(EndpointId endpointId, EndOfServiceEnum newEndOfServiceAlert) +{ + EndOfServiceEnum endOfServiceAlert; + bool success = + GetAttribute(endpointId, Attributes::EndOfServiceAlert::Id, Attributes::EndOfServiceAlert::Get, endOfServiceAlert); + + if (success && (endOfServiceAlert != newEndOfServiceAlert)) + { + success = + SetAttribute(endpointId, Attributes::EndOfServiceAlert::Id, Attributes::EndOfServiceAlert::Set, newEndOfServiceAlert); + + if (success && (newEndOfServiceAlert == EndOfServiceEnum::kExpired)) + { + Events::EndOfService::Type event{}; + SendEvent(endpointId, event); + } + } + + return success; +} + +bool SmokeCoAlarmServer::SetInterconnectSmokeAlarm(EndpointId endpointId, AlarmStateEnum newInterconnectSmokeAlarm) +{ + AlarmStateEnum interconnectSmokeAlarm; + bool success = GetAttribute(endpointId, Attributes::InterconnectSmokeAlarm::Id, Attributes::InterconnectSmokeAlarm::Get, + interconnectSmokeAlarm); + + if (success && (interconnectSmokeAlarm != newInterconnectSmokeAlarm)) + { + success = SetAttribute(endpointId, Attributes::InterconnectSmokeAlarm::Id, Attributes::InterconnectSmokeAlarm::Set, + newInterconnectSmokeAlarm); + + if (success && + (newInterconnectSmokeAlarm == AlarmStateEnum::kWarning || newInterconnectSmokeAlarm == AlarmStateEnum::kCritical)) + { + Events::InterconnectSmokeAlarm::Type event{}; + SendEvent(endpointId, event); + } + } + + return success; +} + +bool SmokeCoAlarmServer::SetInterconnectCOAlarm(EndpointId endpointId, AlarmStateEnum newInterconnectCOAlarm) +{ + AlarmStateEnum interconnectCOAlarm; + bool success = + GetAttribute(endpointId, Attributes::InterconnectCOAlarm::Id, Attributes::InterconnectCOAlarm::Get, interconnectCOAlarm); + + if (success && (interconnectCOAlarm != newInterconnectCOAlarm)) + { + success = SetAttribute(endpointId, Attributes::InterconnectCOAlarm::Id, Attributes::InterconnectCOAlarm::Set, + newInterconnectCOAlarm); + + if (success && (newInterconnectCOAlarm == AlarmStateEnum::kWarning || newInterconnectCOAlarm == AlarmStateEnum::kCritical)) + { + Events::InterconnectCOAlarm::Type event{}; + SendEvent(endpointId, event); + } + } + + return success; +} + +bool SmokeCoAlarmServer::SetContaminationState(EndpointId endpointId, ContaminationStateEnum newContaminationState) +{ + ContaminationStateEnum contaminationState; + bool success = + GetAttribute(endpointId, Attributes::ContaminationState::Id, Attributes::ContaminationState::Get, contaminationState); + + if (success && (contaminationState != newContaminationState)) + { + success = SetAttribute(endpointId, Attributes::ContaminationState::Id, Attributes::ContaminationState::Set, + newContaminationState); + } + + return success; +} + +bool SmokeCoAlarmServer::SetSensitivityLevel(EndpointId endpointId, SensitivityEnum newSensitivityLevel) +{ + SensitivityEnum sensitivityLevel; + bool success = GetAttribute(endpointId, Attributes::SensitivityLevel::Id, Attributes::SensitivityLevel::Get, sensitivityLevel); + + if (success && (sensitivityLevel != newSensitivityLevel)) + { + success = + SetAttribute(endpointId, Attributes::SensitivityLevel::Id, Attributes::SensitivityLevel::Set, newSensitivityLevel); + } + + return success; +} + +bool SmokeCoAlarmServer::GetExpressedState(chip ::EndpointId endpointId, ExpressedStateEnum & expressedState) +{ + return GetAttribute(endpointId, Attributes::ExpressedState::Id, Attributes::ExpressedState::Get, expressedState); +} + +bool SmokeCoAlarmServer::GetSmokeState(EndpointId endpointId, AlarmStateEnum & smokeState) +{ + return GetAttribute(endpointId, Attributes::SmokeState::Id, Attributes::SmokeState::Get, smokeState); +} + +bool SmokeCoAlarmServer::GetCOState(EndpointId endpointId, AlarmStateEnum & coState) +{ + return GetAttribute(endpointId, Attributes::COState::Id, Attributes::COState::Get, coState); +} + +bool SmokeCoAlarmServer::GetBatteryAlert(EndpointId endpointId, AlarmStateEnum & batteryAlert) +{ + return GetAttribute(endpointId, Attributes::BatteryAlert::Id, Attributes::BatteryAlert::Get, batteryAlert); +} + +bool SmokeCoAlarmServer::GetDeviceMuted(EndpointId endpointId, MuteStateEnum & deviceMuted) +{ + return GetAttribute(endpointId, Attributes::DeviceMuted::Id, Attributes::DeviceMuted::Get, deviceMuted); +} + +bool SmokeCoAlarmServer::GetTestInProgress(EndpointId endpointId, bool & testInProgress) +{ + return GetAttribute(endpointId, Attributes::TestInProgress::Id, Attributes::TestInProgress::Get, testInProgress); +} + +bool SmokeCoAlarmServer::GetHardwareFaultAlert(EndpointId endpointId, bool & hardwareFaultAlert) +{ + return GetAttribute(endpointId, Attributes::HardwareFaultAlert::Id, Attributes::HardwareFaultAlert::Get, hardwareFaultAlert); +} + +bool SmokeCoAlarmServer::GetEndOfServiceAlert(EndpointId endpointId, EndOfServiceEnum & endOfServiceAlert) +{ + return GetAttribute(endpointId, Attributes::EndOfServiceAlert::Id, Attributes::EndOfServiceAlert::Get, endOfServiceAlert); +} + +bool SmokeCoAlarmServer::GetInterconnectSmokeAlarm(EndpointId endpointId, AlarmStateEnum & interconnectSmokeAlarm) +{ + return GetAttribute(endpointId, Attributes::InterconnectSmokeAlarm::Id, Attributes::InterconnectSmokeAlarm::Get, + interconnectSmokeAlarm); +} + +bool SmokeCoAlarmServer::GetInterconnectCOAlarm(EndpointId endpointId, AlarmStateEnum & interconnectCOAlarm) +{ + return GetAttribute(endpointId, Attributes::InterconnectCOAlarm::Id, Attributes::InterconnectCOAlarm::Get, interconnectCOAlarm); +} + +bool SmokeCoAlarmServer::GetContaminationState(EndpointId endpointId, ContaminationStateEnum & contaminationState) +{ + return GetAttribute(endpointId, Attributes::ContaminationState::Id, Attributes::ContaminationState::Get, contaminationState); +} + +bool SmokeCoAlarmServer::GetSensitivityLevel(EndpointId endpointId, SensitivityEnum & sensitivityLevel) +{ + return GetAttribute(endpointId, Attributes::SensitivityLevel::Id, Attributes::SensitivityLevel::Get, sensitivityLevel); +} + +chip::BitFlags SmokeCoAlarmServer::GetFeatures(EndpointId endpointId) +{ + chip::BitFlags featureMap; + if (!GetAttribute(endpointId, Attributes::FeatureMap::Id, Attributes::FeatureMap::Get, *featureMap.RawStorage())) + { + ChipLogError(Zcl, "Unable to get the Smoke CO Alarm feature map: attribute read error"); + featureMap.ClearAll(); + } + return featureMap; +} + +/********************************************************** + * SmokeCoAlarmServer private methods + *********************************************************/ + +bool SmokeCoAlarmServer::HandleRemoteSelfTestRequest(CommandHandler * commandObj, const ConcreteCommandPath & commandPath) +{ + EndpointId endpointId = commandPath.mEndpointId; + Status status = Status::Success; + + ExpressedStateEnum expressedState; + bool success = GetExpressedState(endpointId, expressedState); + + if (success) + { + // If the value is busy then return busy + if (expressedState == ExpressedStateEnum::kSmokeAlarm || expressedState == ExpressedStateEnum::kCOAlarm || + expressedState == ExpressedStateEnum::kTesting || expressedState == ExpressedStateEnum::kInterconnectSmoke || + expressedState == ExpressedStateEnum::kInterconnectCO) + { + status = Status::Busy; + } + else + { + success = SetExpressedState(endpointId, ExpressedStateEnum::kTesting); + + if (success) + { + success = emberAfPluginSmokeCoAlarmSelfTestRequestCommand(endpointId); + } + } + } + + if (!success) + { + status = Status::Failure; + } + + commandObj->AddStatus(commandPath, status); + return true; +} + +template +void SmokeCoAlarmServer::SendEvent(EndpointId endpointId, T & event) +{ + EventNumber eventNumber; + auto err = LogEvent(event, endpointId, eventNumber); + + if (CHIP_NO_ERROR != err) + { + ChipLogError(Zcl, "Failed to log event: err=%" CHIP_ERROR_FORMAT ", event_id=" ChipLogFormatMEI, err.Format(), + ChipLogValueMEI(event.GetEventId())); + } +} + +template +bool SmokeCoAlarmServer::GetAttribute(EndpointId endpointId, AttributeId attributeId, + EmberAfStatus (*getFn)(EndpointId endpointId, T * value), T & value) const +{ + EmberAfStatus status = getFn(endpointId, &value); + bool success = (EMBER_ZCL_STATUS_SUCCESS == status); + + if (!success) + { + ChipLogError(Zcl, "Failed to read SmokeCOAlarm attribute: attribute=" ChipLogFormatMEI ", status=0x%x", + ChipLogValueMEI(attributeId), to_underlying(status)); + } + return success; +} + +template +bool SmokeCoAlarmServer::SetAttribute(EndpointId endpointId, AttributeId attributeId, + EmberAfStatus (*setFn)(EndpointId endpointId, T value), T value) +{ + EmberAfStatus status = setFn(endpointId, value); + bool success = (EMBER_ZCL_STATUS_SUCCESS == status); + + if (!success) + { + ChipLogError(Zcl, "Failed to write SmokeCOAlarm attribute: attribute=" ChipLogFormatMEI ", status=0x%x", + ChipLogValueMEI(attributeId), to_underlying(status)); + } + return success; +} + +// ============================================================================= +// Cluster commands callbacks +// ============================================================================= + +bool emberAfSmokeCoAlarmClusterSelfTestRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Commands::SelfTestRequest::DecodableType & commandData) +{ + return SmokeCoAlarmServer::Instance().HandleRemoteSelfTestRequest(commandObj, commandPath); +} + +void MatterSmokeCoAlarmPluginServerInitCallback() {} diff --git a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h new file mode 100644 index 00000000000000..1adf563c4d53ff --- /dev/null +++ b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h @@ -0,0 +1,170 @@ +/** + * + * 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. + */ + +/** + * @file + * APIs and defines for the Smoke CO Alarm Server plugin. + * + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +/** + * @brief Smoke CO Alarm Server Plugin class + */ +class SmokeCoAlarmServer +{ +public: + static SmokeCoAlarmServer & Instance(); + + using AlarmStateEnum = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using ContaminationStateEnum = chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum; + using EndOfServiceEnum = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; + using ExpressedStateEnum = chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum; + using Feature = chip::app::Clusters::SmokeCoAlarm::Feature; + using MuteStateEnum = chip::app::Clusters::SmokeCoAlarm::MuteStateEnum; + using SensitivityEnum = chip::app::Clusters::SmokeCoAlarm::SensitivityEnum; + + /** + * For all the functions below, the return value is true on success, false on failure + */ + + /** + * @brief Updates the expressed state with new value + * + * @note If the value of ExpressedState is not Normal, the attribute corresponding to the value should not be Normal. + * + * @param endpointId ID of the endpoint + * @param newExpressedState new expressed state + * @return true on success, false on failure + */ + bool SetExpressedState(chip::EndpointId endpointId, ExpressedStateEnum newExpressedState); + + bool SetSmokeState(chip::EndpointId endpointId, AlarmStateEnum newSmokeState); + bool SetCOState(chip::EndpointId endpointId, AlarmStateEnum newCOState); + bool SetBatteryAlert(chip::EndpointId endpointId, AlarmStateEnum newBatteryAlert); + bool SetDeviceMuted(chip::EndpointId endpointId, MuteStateEnum newDeviceMuted); + bool SetTestInProgress(chip::EndpointId endpointId, bool newTestInProgress); + bool SetHardwareFaultAlert(chip::EndpointId endpointId, bool newHardwareFaultAlert); + bool SetEndOfServiceAlert(chip::EndpointId endpointId, EndOfServiceEnum newEndOfServiceAlert); + bool SetInterconnectSmokeAlarm(chip::EndpointId endpointId, AlarmStateEnum newInterconnectSmokeAlarm); + bool SetInterconnectCOAlarm(chip::EndpointId endpointId, AlarmStateEnum newInterconnectCOAlarm); + bool SetContaminationState(chip::EndpointId endpointId, ContaminationStateEnum newContaminationState); + bool SetSensitivityLevel(chip::EndpointId endpointId, SensitivityEnum newSensitivityLevel); + // bool SetExpiryDate(chip::EndpointId endpointId, Date newExpiryDate); // TODO: Date type encoding not defined + + bool GetExpressedState(chip::EndpointId endpointId, ExpressedStateEnum & expressedState); + bool GetSmokeState(chip::EndpointId endpointId, AlarmStateEnum & smokeState); + bool GetCOState(chip::EndpointId endpointId, AlarmStateEnum & coState); + bool GetBatteryAlert(chip::EndpointId endpointId, AlarmStateEnum & batteryAlert); + bool GetDeviceMuted(chip::EndpointId endpointId, MuteStateEnum & deviceMuted); + bool GetTestInProgress(chip::EndpointId endpointId, bool & testInProgress); + bool GetHardwareFaultAlert(chip::EndpointId endpointId, bool & hardwareFaultAlert); + bool GetEndOfServiceAlert(chip::EndpointId endpointId, EndOfServiceEnum & endOfServiceAlert); + bool GetInterconnectSmokeAlarm(chip::EndpointId endpointId, AlarmStateEnum & interconnectSmokeAlarm); + bool GetInterconnectCOAlarm(chip::EndpointId endpointId, AlarmStateEnum & interconnectCOAlarm); + bool GetContaminationState(chip::EndpointId endpointId, ContaminationStateEnum & contaminationState); + bool GetSensitivityLevel(chip::EndpointId endpointId, SensitivityEnum & sensitivityLevel); + // bool GetExpiryDate(chip::EndpointId endpointId, Date & expiryDate); // TODO: Date type encoding not defined + + chip::BitFlags GetFeatures(chip::EndpointId endpointId); + + inline bool SupportsSmokeAlarm(chip::EndpointId endpointId) { return GetFeatures(endpointId).Has(Feature::kSmokeAlarm); } + + inline bool SupportsCOAlarm(chip::EndpointId endpointId) { return GetFeatures(endpointId).Has(Feature::kCoAlarm); } + +private: + /** + * @brief Common handler for SelfTestRequest commands + * + * @param commandObj original command context + * @param commandPath original command path + * @return true if successful + * @return false if error happened + */ + bool HandleRemoteSelfTestRequest(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath); + + /** + * @brief Send generic event + * + * @tparam T Any event type supported by Matter + * @param endpointId endpoint where SmokeCoAlarmServer is running + * @param event event object built by caller + */ + template + void SendEvent(chip::EndpointId endpointId, T & event); + + /** + * @brief Get generic attribute value + * + * @tparam T attribute value type + * @param endpointId endpoint where SmokeCoAlarmServer is running + * @param attributeId attribute Id (used for logging only) + * @param getFn attribute getter function as defined in + * @param value actual attribute value on success + * @return true on success (value is set to the actual attribute value) + * @return false if attribute reading failed (value is kept unchanged) + */ + template + bool GetAttribute(chip::EndpointId endpointId, chip::AttributeId attributeId, + EmberAfStatus (*getFn)(chip::EndpointId endpointId, T * value), T & value) const; + + /** + * @brief Set generic attribute value + * + * @tparam T attribute value type + * @param endpointId endpoint where SmokeCoAlarmServer is running + * @param attributeId attribute Id (used for logging only) + * @param setFn attribute setter function as defined in + * @param value new attribute value + * @return true on success + * @return false if attribute writing failed + */ + template + bool SetAttribute(chip::EndpointId endpointId, chip::AttributeId attributeId, + EmberAfStatus (*setFn)(chip::EndpointId endpointId, T value), T value); + + friend bool emberAfSmokeCoAlarmClusterSelfTestRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::DecodableType & commandData); + + static SmokeCoAlarmServer sInstance; +}; + +// ============================================================================= +// Plugin callbacks that are called by cluster server and should be implemented +// by the server app +// ============================================================================= + +/** + * @brief User handler for SelfTestRequest command (server) + * + * @note The application must set the ExpressedState to "Testing" + * + * @param endpointId endpoint for which SelfTestRequest command is called + * + * @retval true on success + * @retval false if error happened (err should be set to appropriate error code) + */ +bool emberAfPluginSmokeCoAlarmSelfTestRequestCommand(chip::EndpointId endpointId); diff --git a/src/app/icd/BUILD.gn b/src/app/icd/BUILD.gn new file mode 100644 index 00000000000000..63157175f12e7b --- /dev/null +++ b/src/app/icd/BUILD.gn @@ -0,0 +1,53 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("icd.gni") + +# ICD Server sources and configurations + +# ICD Manager source-set is broken out of the main source-set to enable unit tests +# All sources and configurations used by the ICDManager need to go in this source-set +source_set("manager-srcs") { + sources = [ + "ICDManager.cpp", + "ICDManager.h", + ] + + public_deps = [ "${chip_root}/src/lib/core" ] +} + +# ICD Server Configuration +# All configurations necessary to the ICD Server featureset need to in this configuration +config("server-config") { + defines = [ "CHIP_CONFIG_ENABLE_ICD_SERVER" ] +} + +# servers-srcs source-set contains all the sources and configurations necessary to build the ICD Server functionality +# All sources, configurations and dependencies necessary for the ICD Server featureset need to go in this source-set +# +# The ICD Server featureset is enabled with the chip_enable_icd_server in the src/app/BUILD.gn file +source_set("server-srcs") { + sources = [ + "ICDEventManager.cpp", + "ICDEventManager.h", + ] + + public_deps = [ + ":manager-srcs", + "${chip_root}/src/platform:platform", + ] + + public_configs = [ ":server-config" ] +} diff --git a/src/app/icd/ICDEventManager.cpp b/src/app/icd/ICDEventManager.cpp new file mode 100644 index 00000000000000..827276b81ebcfb --- /dev/null +++ b/src/app/icd/ICDEventManager.cpp @@ -0,0 +1,49 @@ +/* + * + * 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 + +using namespace chip::DeviceLayer; + +namespace chip { +namespace app { + +CHIP_ERROR ICDEventManager::Init(ICDManager * icdManager) +{ + VerifyOrReturnError(icdManager != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + mICDManager = icdManager; + + PlatformMgr().AddEventHandler(ICDEventHandler, reinterpret_cast(nullptr)); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ICDEventManager::Shutdown() +{ + PlatformMgr().RemoveEventHandler(ICDEventHandler, reinterpret_cast(nullptr)); + mICDManager = nullptr; + + return CHIP_NO_ERROR; +} + +void ICDEventManager::ICDEventHandler(const ChipDeviceEvent * event, intptr_t arg) +{ + // TODO +} + +} // namespace app +} // namespace chip diff --git a/src/app/icd/ICDEventManager.h b/src/app/icd/ICDEventManager.h new file mode 100644 index 00000000000000..c6a305d24d57a9 --- /dev/null +++ b/src/app/icd/ICDEventManager.h @@ -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. + */ +#pragma once +#include + +#include +#include +#include + +namespace chip { +namespace app { + +/** + * @brief ICDEventManager class is responsible of processing Platform Events that affect an ICD's behaviour + * The class registers an Event Handler with the Platform Manager and dispatches the processing to the ICDManager class. + */ +class ICDEventManager +{ + +public: + ICDEventManager() = default; + + /** + * @brief Initialisation function of the ICDEventManager. + * Init function MUST be called before using the object + */ + CHIP_ERROR Init(ICDManager * icdManager); + CHIP_ERROR Shutdown(); + +private: + /** + * @brief Event Handler callback given to the PlatformManager + * Function dispatchs the event to the ICDManager member + */ + static void ICDEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + + ICDManager * mICDManager; +}; + +} // namespace app +} // namespace chip diff --git a/src/lib/assign/ValueAssign.h b/src/app/icd/ICDManager.cpp similarity index 58% rename from src/lib/assign/ValueAssign.h rename to src/app/icd/ICDManager.cpp index c188c152866aef..a71ca14457c546 100644 --- a/src/lib/assign/ValueAssign.h +++ b/src/app/icd/ICDManager.cpp @@ -1,4 +1,5 @@ /* + * * Copyright (c) 2023 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,33 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#pragma once -#include -#include +#include namespace chip { -namespace Value { - -template -DEST & Assign(DEST & dest, const SRC & src) -{ - return dest = src; -} - -template <> -std::string & Assign(std::string & dest, const CharSpan & src) -{ - dest = std::string(src.begin(), src.end()); - return dest; -} +namespace app { -template <> -CharSpan & Assign(CharSpan & dest, const std::string & src) -{ - dest = CharSpan(src.c_str(), src.size()); - return dest; -} +ICDManager::ICDManager() {} -} // namespace Value +} // namespace app } // namespace chip diff --git a/examples/dynamic-bridge-app/linux/include/Backend.h b/src/app/icd/ICDManager.h similarity index 64% rename from examples/dynamic-bridge-app/linux/include/Backend.h rename to src/app/icd/ICDManager.h index d709bf17b74937..8c8e55916c3fa8 100644 --- a/examples/dynamic-bridge-app/linux/include/Backend.h +++ b/src/app/icd/ICDManager.h @@ -1,7 +1,6 @@ /* * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. + * 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. @@ -15,15 +14,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #pragma once -#include "DynamicDevice.h" +namespace chip { +namespace app { -void StartUserInput(); +/** + * @brief ICD Manager is responsible of processing the events and triggering the correct action for an ICD + */ +class ICDManager +{ +public: + ICDManager(); -extern std::vector> g_devices; -extern std::vector> g_device_impls; +private: +}; -bool RemoveDeviceAt(uint32_t index); -int AddDevice(std::unique_ptr device); +} // namespace app +} // namespace chip diff --git a/src/app/icd/icd.gni b/src/app/icd/icd.gni new file mode 100644 index 00000000000000..4d1dfac7eeb2f3 --- /dev/null +++ b/src/app/icd/icd.gni @@ -0,0 +1,23 @@ +# 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. + +declare_args() { + # Matter SDK Configuration flag to enable ICD server functionality + # TODO - Add Specifics when the design is refined + chip_enable_icd_server = false + + # Matter SDK Configuration flag to enable ICD client functionality + # TODO - Add Specifics when the design is refined + chip_enable_icd_client = false +} diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index b5ccf4566a7351..7761e24ffb1c75 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -298,7 +298,7 @@ CHIP_ERROR Engine::CheckAccessDeniedEventPaths(TLV::TLVWriter & aWriter, bool & CHIP_ERROR err = CHIP_NO_ERROR; for (auto current = apReadHandler->mpEventPathList; current != nullptr;) { - if (current->mValue.HasEventWildcard()) + if (current->mValue.IsWildcardPath()) { current = current->mpNext; continue; @@ -324,7 +324,7 @@ CHIP_ERROR Engine::CheckAccessDeniedEventPaths(TLV::TLVWriter & aWriter, bool & break; } aHasEncodedData = true; - ChipLogDetail(InteractionModel, "Acces to event (%u, " ChipLogFormatMEI ", " ChipLogFormatMEI ") denied by ACL", + ChipLogDetail(InteractionModel, "Access to event (%u, " ChipLogFormatMEI ", " ChipLogFormatMEI ") denied by ACL", current->mValue.mEndpointId, ChipLogValueMEI(current->mValue.mClusterId), ChipLogValueMEI(current->mValue.mEventId)); } diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 75a4262716f5a8..0793832d17271c 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -247,6 +247,10 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) } #endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT +#ifdef CHIP_CONFIG_ENABLE_ICD_SERVER + mICDEventManager.Init(&mICDManager); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + // This initializes clusters, so should come after lower level initialization. InitDataModelHandler(); @@ -484,6 +488,9 @@ void Server::Shutdown() mAccessControl.Finish(); Access::ResetAccessControlToDefault(); Credentials::SetGroupDataProvider(nullptr); +#ifdef CHIP_CONFIG_ENABLE_ICD_SERVER + mICDEventManager.Shutdown(); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER mAttributePersister.Shutdown(); // TODO(16969): Remove chip::Platform::MemoryInit() call from Server class, it belongs to outer code chip::Platform::MemoryShutdown(); diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 7eea447e20dc45..d2cdaacb7f48ea 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -65,6 +65,11 @@ #endif #include +#ifdef CHIP_CONFIG_ENABLE_ICD_SERVER +#include // nogncheck +#include // nogncheck +#endif + namespace chip { constexpr size_t kMaxBlePendingPackets = 1; @@ -595,6 +600,10 @@ class Server Inet::InterfaceId mInterfaceId; System::Clock::Microseconds64 mInitTimestamp; +#ifdef CHIP_CONFIG_ENABLE_ICD_SERVER + app::ICDEventManager mICDEventManager; + app::ICDManager mICDManager; +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER }; } // namespace chip diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 1f7ad407339ca8..0faf6d0b06a05c 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -54,17 +54,17 @@ source_set("binding-test-srcs") { ] } -# source_set("client-monitoring-test-srcs") { -# sources = [ -# "${chip_root}/src/app/util/ClientMonitoringRegistrationTable.cpp", -# "${chip_root}/src/app/util/ClientMonitoringRegistrationTable.h", -# ] - -# public_deps = [ -# "${chip_root}/src/app/common:cluster-objects", -# "${chip_root}/src/lib/core", -# ] -# } +source_set("icd-management-test-srcs") { + sources = [ + "${chip_root}/src/app/util/IcdMonitoringTable.cpp", + "${chip_root}/src/app/util/IcdMonitoringTable.h", + ] + + public_deps = [ + "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/lib/core", + ] +} source_set("ota-requestor-test-srcs") { sources = [ @@ -107,10 +107,6 @@ chip_test_suite("tests") { "TestAttributeValueEncoder.cpp", "TestBindingTable.cpp", "TestBuilderParser.cpp", - - # Disable CM cluster table tests until update is done - # https://github.com/project-chip/connectedhomeip/issues/24425 - # "TestClientMonitoringRegistrationTable.cpp", "TestClusterInfo.cpp", "TestCommandInteraction.cpp", "TestCommandPathParams.cpp", @@ -121,6 +117,8 @@ chip_test_suite("tests") { "TestEventPathParams.cpp", "TestExtensionFieldSets.cpp", "TestFabricScopedEventLogging.cpp", + "TestICDManager.cpp", + "TestIcdMonitoringTable.cpp", "TestInteractionModelEngine.cpp", "TestMessageDef.cpp", "TestNumericAttributeTraits.cpp", @@ -162,14 +160,12 @@ chip_test_suite("tests") { public_deps = [ ":binding-test-srcs", - - # Disable CM cluster table tests until update is done - #https://github.com/project-chip/connectedhomeip/issues/24425 - # ":client-monitoring-test-srcs", + ":icd-management-test-srcs", ":ota-requestor-test-srcs", ":scenes-table-test-srcs", "${chip_root}/src/app", "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/app/icd:manager-srcs", "${chip_root}/src/app/tests:helpers", "${chip_root}/src/app/util/mock:mock_ember", "${chip_root}/src/lib/core", diff --git a/src/app/tests/TestClientMonitoringRegistrationTable.cpp b/src/app/tests/TestClientMonitoringRegistrationTable.cpp deleted file mode 100644 index e6802151b7d4d6..00000000000000 --- a/src/app/tests/TestClientMonitoringRegistrationTable.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include -#include - -using chip::ClientMonitoringRegistrationTable; -using chip::NullOptional; - -namespace { - -constexpr chip::FabricIndex kTestFabricIndex = 1; -constexpr uint64_t kTestICid = 10; -constexpr chip::NodeId kTestClientNodeId = 11; - -constexpr chip::FabricIndex kTestFabricIndex_2 = 2; -constexpr uint64_t kTestICid_2 = 20; -constexpr chip::NodeId kTestClientNodeId_2 = 21; - -void TestDefaultClientValues(nlTestSuite * aSuite, void * aContext) -{ - chip::TestPersistentStorageDelegate testStorage; - ClientMonitoringRegistrationTable registration(testStorage); - - NL_TEST_ASSERT(aSuite, !registration.GetClientRegistrationEntry().IsValid()); - NL_TEST_ASSERT(aSuite, registration.GetClientRegistrationEntry().clientNodeId == chip::kUndefinedFabricIndex); - NL_TEST_ASSERT(aSuite, registration.GetClientRegistrationEntry().ICid == chip::kUndefinedNodeId); - NL_TEST_ASSERT(aSuite, registration.GetClientRegistrationEntry().fabricIndex == chip::kInvalidIcId); -} - -void TestLoadFromStorageEmptyValue(nlTestSuite * aSuite, void * aContext) -{ - chip::TestPersistentStorageDelegate testStorage; - ClientMonitoringRegistrationTable registration(testStorage); - - CHIP_ERROR err = registration.LoadFromStorage(kTestFabricIndex); - NL_TEST_ASSERT(aSuite, err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); -} - -void TestSaveAndLoadRegistrationValue(nlTestSuite * aSuite, void * aContext) -{ - chip::TestPersistentStorageDelegate testStorage; - ClientMonitoringRegistrationTable savedRegistration(testStorage); - ClientMonitoringRegistrationTable loadedRegistration(testStorage); - - savedRegistration.GetClientRegistrationEntry().clientNodeId = kTestClientNodeId; - savedRegistration.GetClientRegistrationEntry().ICid = kTestICid; - savedRegistration.GetClientRegistrationEntry().fabricIndex = kTestFabricIndex; - - CHIP_ERROR err = savedRegistration.SaveToStorage(); - NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); - - err = loadedRegistration.LoadFromStorage(kTestFabricIndex); - NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); - - NL_TEST_ASSERT(aSuite, loadedRegistration.GetClientRegistrationEntry().clientNodeId == kTestClientNodeId); - NL_TEST_ASSERT(aSuite, loadedRegistration.GetClientRegistrationEntry().ICid == kTestICid); - NL_TEST_ASSERT(aSuite, loadedRegistration.GetClientRegistrationEntry().fabricIndex == kTestFabricIndex); -} - -void TestSaveLoadRegistrationValueForMultipleFabrics(nlTestSuite * aSuite, void * aContexT) -{ - chip::TestPersistentStorageDelegate testStorage; - ClientMonitoringRegistrationTable savedRegistration(testStorage); - ClientMonitoringRegistrationTable loadedRegistration(testStorage); - - savedRegistration.GetClientRegistrationEntry().clientNodeId = kTestClientNodeId; - savedRegistration.GetClientRegistrationEntry().ICid = kTestICid; - savedRegistration.GetClientRegistrationEntry().fabricIndex = kTestFabricIndex; - - CHIP_ERROR err = savedRegistration.SaveToStorage(); - NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); - - savedRegistration.GetClientRegistrationEntry().clientNodeId = kTestClientNodeId_2; - savedRegistration.GetClientRegistrationEntry().ICid = kTestICid_2; - savedRegistration.GetClientRegistrationEntry().fabricIndex = kTestFabricIndex_2; - - err = savedRegistration.SaveToStorage(); - NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); - - err = loadedRegistration.LoadFromStorage(kTestFabricIndex); - NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); - - NL_TEST_ASSERT(aSuite, loadedRegistration.GetClientRegistrationEntry().clientNodeId == kTestClientNodeId); - NL_TEST_ASSERT(aSuite, loadedRegistration.GetClientRegistrationEntry().ICid == kTestICid); - NL_TEST_ASSERT(aSuite, loadedRegistration.GetClientRegistrationEntry().fabricIndex == kTestFabricIndex); - - err = loadedRegistration.LoadFromStorage(kTestFabricIndex_2); - NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); - - NL_TEST_ASSERT(aSuite, loadedRegistration.GetClientRegistrationEntry().clientNodeId == kTestClientNodeId_2); - NL_TEST_ASSERT(aSuite, loadedRegistration.GetClientRegistrationEntry().ICid == kTestICid_2); - NL_TEST_ASSERT(aSuite, loadedRegistration.GetClientRegistrationEntry().fabricIndex == kTestFabricIndex_2); -} - -void TestSaveAllInvalidRegistrationValues(nlTestSuite * aSuite, void * context) -{ - chip::TestPersistentStorageDelegate testStorage; - ClientMonitoringRegistrationTable registration(testStorage); - - CHIP_ERROR err = registration.SaveToStorage(); - NL_TEST_ASSERT(aSuite, err == CHIP_ERROR_INCORRECT_STATE); -} - -void TestDeleteValidEntryFromStorage(nlTestSuite * aSuite, void * context) -{ - chip::TestPersistentStorageDelegate testStorage; - ClientMonitoringRegistrationTable table(testStorage); - - table.GetClientRegistrationEntry().clientNodeId = kTestClientNodeId; - table.GetClientRegistrationEntry().ICid = kTestICid; - table.GetClientRegistrationEntry().fabricIndex = kTestFabricIndex; - - CHIP_ERROR err = table.SaveToStorage(); - NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); - - NL_TEST_ASSERT(aSuite, table.HasValueForFabric(kTestFabricIndex)); - - err = table.DeleteFromStorage(kTestFabricIndex); - NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); - - NL_TEST_ASSERT(aSuite, !table.HasValueForFabric(kTestFabricIndex)); -} - -} // namespace - -int TestClientMonitoringRegistrationTable() -{ - static nlTest sTests[] = { NL_TEST_DEF("TestDefaultClientValues", TestDefaultClientValues), - NL_TEST_DEF("TestLoadFromStorageEmptyValue", TestLoadFromStorageEmptyValue), - NL_TEST_DEF("TestSaveAndLoadRegistrationValue", TestSaveAndLoadRegistrationValue), - NL_TEST_DEF("TestSaveAllInvalidRegistrationValues", TestSaveAllInvalidRegistrationValues), - NL_TEST_DEF("TestSaveLoadRegistrationValueForMultipleFabrics", - TestSaveLoadRegistrationValueForMultipleFabrics), - NL_TEST_DEF("TestDeleteValidEntryFromStorage", TestDeleteValidEntryFromStorage), - NL_TEST_SENTINEL() }; - - nlTestSuite cmSuite = { "TestClientMonitoringRegistrationTable", &sTests[0], nullptr, nullptr }; - - nlTestRunner(&cmSuite, nullptr); - return (nlTestRunnerStats(&cmSuite)); -} - -CHIP_REGISTER_TEST_SUITE(TestClientMonitoringRegistrationTable) diff --git a/src/app/tests/TestEventLogging.cpp b/src/app/tests/TestEventLogging.cpp index 732dd9e99c9cc9..221dd3d9f1ff9f 100644 --- a/src/app/tests/TestEventLogging.cpp +++ b/src/app/tests/TestEventLogging.cpp @@ -55,9 +55,9 @@ static const chip::EndpointId kTestEndpointId1 = 2; static const chip::EndpointId kTestEndpointId2 = 3; static const chip::TLV::Tag kLivenessDeviceStatus = chip::TLV::ContextTag(1); -static uint8_t gDebugEventBuffer[128]; -static uint8_t gInfoEventBuffer[128]; -static uint8_t gCritEventBuffer[128]; +static uint8_t gDebugEventBuffer[120]; +static uint8_t gInfoEventBuffer[120]; +static uint8_t gCritEventBuffer[120]; static chip::app::CircularEventBuffer gCircularEventBuffer[3]; class TestContext : public chip::Test::AppContext @@ -154,6 +154,15 @@ static void CheckLogReadOut(nlTestSuite * apSuite, chip::app::EventManagement & err = alogMgmt.FetchEventsSince(writer, clusterInfo, startingEventNumber, eventCount, chip::Access::SubjectDescriptor{}); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR || err == CHIP_END_OF_TLV); + auto eventTLVSize = writer.GetLengthWritten() / eventCount; + // XXX: Make sure that the sizes of our event storages are big enough to hold at least 3 events + // but small enough not to hold 4 events. It is very important to check this because of the + // hard-coded logic of this unit test. + // The size of TLV-encoded event can vary depending on the UTC vs system time controlled by + // the CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS, because the relative system time + // will be most likely encoded in 1 byte, while the UTC time will be encoded in 8 bytes. + NL_TEST_ASSERT(apSuite, sizeof(gDebugEventBuffer) >= eventTLVSize * 3 && sizeof(gDebugEventBuffer) < eventTLVSize * 4); + reader.Init(backingStore.Get(), writer.GetLengthWritten()); err = chip::TLV::Utilities::Count(reader, totalNumElements, false); @@ -307,22 +316,19 @@ static void CheckLogEventWithDiscardLowEvent(nlTestSuite * apSuite, void * apCon NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); CheckLogState(apSuite, logMgmt, 3, chip::app::PriorityLevel::Debug); } -/** - * Test Suite. It lists all the test functions. - */ -const nlTest sTests[] = { NL_TEST_DEF("CheckLogEventWithEvictToNextBuffer", CheckLogEventWithEvictToNextBuffer), - NL_TEST_DEF("CheckLogEventWithDiscardLowEvent", CheckLogEventWithDiscardLowEvent), NL_TEST_SENTINEL() }; +const nlTest sTests[] = { + NL_TEST_DEF("CheckLogEventWithEvictToNextBuffer", CheckLogEventWithEvictToNextBuffer), + NL_TEST_DEF("CheckLogEventWithDiscardLowEvent", CheckLogEventWithDiscardLowEvent), + NL_TEST_SENTINEL(), +}; -// clang-format off -nlTestSuite sSuite = -{ +nlTestSuite sSuite = { "EventLogging", &sTests[0], TestContext::Initialize, - TestContext::Finalize + TestContext::Finalize, }; -// clang-format on } // namespace diff --git a/examples/dynamic-bridge-app/bridge-common/include/CHIPProjectAppConfig.h b/src/app/tests/TestICDManager.cpp similarity index 55% rename from examples/dynamic-bridge-app/bridge-common/include/CHIPProjectAppConfig.h rename to src/app/tests/TestICDManager.cpp index 036cbda81ad736..6fdaeedf45a73f 100644 --- a/examples/dynamic-bridge-app/bridge-common/include/CHIPProjectAppConfig.h +++ b/src/app/tests/TestICDManager.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2023 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,20 +15,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include +#include -/** - * @file - * Example project configuration file for CHIP. - * - * This is a place to put application or project-specific overrides - * to the default configuration values for general CHIP features. - * - */ +int TestICDManager() +{ + static nlTest sTests[] = { NL_TEST_SENTINEL() }; -#pragma once + nlTestSuite cmSuite = { "TestICDManager", &sTests[0], nullptr, nullptr }; -// overrides CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT in CHIPProjectConfig -#define CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT 16 + nlTestRunner(&cmSuite, nullptr); + return (nlTestRunnerStats(&cmSuite)); +} -// include the CHIPProjectConfig from config/standalone -#include +CHIP_REGISTER_TEST_SUITE(TestICDManager) diff --git a/src/app/tests/TestIcdMonitoringTable.cpp b/src/app/tests/TestIcdMonitoringTable.cpp new file mode 100644 index 00000000000000..e87adfa3ed84d3 --- /dev/null +++ b/src/app/tests/TestIcdMonitoringTable.cpp @@ -0,0 +1,372 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include + +using namespace chip; + +namespace { + +constexpr uint16_t kMaxTestClients1 = 2; +constexpr uint16_t kMaxTestClients2 = 1; +constexpr FabricIndex kTestFabricIndex1 = 1; +constexpr FabricIndex kTestFabricIndex2 = kMaxValidFabricIndex; +constexpr uint64_t kClientNodeId11 = 0x100001; +constexpr uint64_t kClientNodeId12 = 0x100002; +constexpr uint64_t kClientNodeId13 = 0x100003; +constexpr uint64_t kClientNodeId21 = 0x200001; +constexpr uint64_t kClientNodeId22 = 0x200002; + +constexpr uint8_t kKeyBuffer0a[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +constexpr uint8_t kKeyBuffer0b[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + +constexpr uint8_t kKeyBuffer1a[] = { + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f +}; +constexpr uint8_t kKeyBuffer1b[] = { + 0xf1, 0xe1, 0xd1, 0xc1, 0xb1, 0xa1, 0x91, 0x81, 0x71, 0x61, 0x51, 0x14, 0x31, 0x21, 0x11, 0x01 +}; +constexpr uint8_t kKeyBuffer2a[] = { + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f +}; +constexpr uint8_t kKeyBuffer2b[] = { + 0xf2, 0xe2, 0xd2, 0xc2, 0xb2, 0xa2, 0x92, 0x82, 0x72, 0x62, 0x52, 0x42, 0x32, 0x22, 0x12, 0x02 +}; +constexpr uint8_t kKeyBuffer3a[] = { + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f +}; +// constexpr uint8_t kKeyBuffer3b[] = { 0xf3, 0xe3, 0xd3, 0xc3, 0xb3, 0xa3, 0x93, 0x83, 0x73, 0x63, 0x53, 0x14, 0x33, 0x23, 0x13, +// 0x03 }; + +void TestSaveAndLoadRegistrationValue(nlTestSuite * aSuite, void * aContext) +{ + TestPersistentStorageDelegate storage; + IcdMonitoringTable saving(storage, kTestFabricIndex1, kMaxTestClients1); + IcdMonitoringTable loading(storage, kTestFabricIndex1, kMaxTestClients1); + IcdMonitoringEntry entry; + CHIP_ERROR err; + + // Insert first entry + entry.checkInNodeID = kClientNodeId11; + entry.monitoredSubject = kClientNodeId12; + entry.key = ByteSpan(kKeyBuffer1a); + err = saving.Set(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + // Insert second entry + entry.checkInNodeID = kClientNodeId12; + entry.monitoredSubject = kClientNodeId11; + entry.key = ByteSpan(kKeyBuffer2a); + err = saving.Set(1, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + // Insert one too many + entry.checkInNodeID = kClientNodeId13; + entry.monitoredSubject = kClientNodeId13; + entry.key = ByteSpan(kKeyBuffer3a); + err = saving.Set(2, entry); + NL_TEST_ASSERT(aSuite, CHIP_ERROR_INVALID_ARGUMENT == err); + + // Retrieve first entry + err = loading.Get(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex1 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer1a) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer1a, entry.key.size())); + + // Retrieve second entry + err = loading.Get(1, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex1 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer2a) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer2a, entry.key.size())); + + // No more entries + err = loading.Get(2, entry); + NL_TEST_ASSERT(aSuite, 2 == loading.Limit()); + NL_TEST_ASSERT(aSuite, CHIP_ERROR_NOT_FOUND == err); + + // Overwrite first entry + entry.checkInNodeID = kClientNodeId13; + entry.monitoredSubject = kClientNodeId11; + entry.key = ByteSpan(kKeyBuffer1b); + err = saving.Set(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + // Retrieve first entry (modified) + err = loading.Get(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex1 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId13 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer1b) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer1b, entry.key.size())); + + // Retrieve second entry (not modified) + err = loading.Get(1, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex1 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer2a) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer2a, entry.key.size())); +} + +void TestSaveAllInvalidRegistrationValues(nlTestSuite * aSuite, void * aContext) +{ + TestPersistentStorageDelegate storage; + IcdMonitoringTable table(storage, kTestFabricIndex1, kMaxTestClients1); + IcdMonitoringEntry entry; + CHIP_ERROR err; + + // Invalid checkInNodeID + entry.checkInNodeID = kUndefinedNodeId; + entry.monitoredSubject = kClientNodeId12; + entry.key = ByteSpan(kKeyBuffer1a); + err = table.Set(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_ERROR_INVALID_ARGUMENT == err); + + // Invalid monitoredSubject + entry.checkInNodeID = kClientNodeId11; + entry.monitoredSubject = kUndefinedNodeId; + entry.key = ByteSpan(kKeyBuffer1a); + err = table.Set(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_ERROR_INVALID_ARGUMENT == err); + + // Invalid key (empty) + entry.checkInNodeID = kClientNodeId11; + entry.monitoredSubject = kClientNodeId12; + entry.key = ByteSpan(); + err = table.Set(0, entry); + + NL_TEST_ASSERT(aSuite, CHIP_ERROR_INVALID_ARGUMENT == err); + // Invalid key (too short) + entry.checkInNodeID = kClientNodeId11; + entry.monitoredSubject = kClientNodeId12; + entry.key = ByteSpan(kKeyBuffer0a); + err = table.Set(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_ERROR_INVALID_ARGUMENT == err); + + // Invalid key (too long) + entry.checkInNodeID = kClientNodeId11; + entry.monitoredSubject = kClientNodeId12; + entry.key = ByteSpan(kKeyBuffer0b); + err = table.Set(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_ERROR_INVALID_ARGUMENT == err); +} + +void TestSaveLoadRegistrationValueForMultipleFabrics(nlTestSuite * aSuite, void * aContext) +{ + TestPersistentStorageDelegate storage; + IcdMonitoringTable table1(storage, kTestFabricIndex1, kMaxTestClients1); + IcdMonitoringTable table2(storage, kTestFabricIndex2, kMaxTestClients2); + IcdMonitoringEntry entry; + CHIP_ERROR err; + + // Insert in first fabric + entry.checkInNodeID = kClientNodeId11; + entry.monitoredSubject = kClientNodeId12; + entry.key = ByteSpan(kKeyBuffer1a); + err = table1.Set(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + // Insert in first fabric + entry.checkInNodeID = kClientNodeId12; + entry.monitoredSubject = kClientNodeId11; + entry.key = ByteSpan(kKeyBuffer1b); + err = table1.Set(1, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + // Insert in second fabric + entry.checkInNodeID = kClientNodeId21; + entry.monitoredSubject = kClientNodeId22; + entry.key = ByteSpan(kKeyBuffer2a); + err = table2.Set(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + // Insert in second fabric (one too many) + entry.checkInNodeID = kClientNodeId22; + entry.monitoredSubject = kClientNodeId21; + entry.key = ByteSpan(kKeyBuffer2b); + err = table2.Set(1, entry); + NL_TEST_ASSERT(aSuite, CHIP_ERROR_INVALID_ARGUMENT == err); + + // Retrieve fabric1, first entry + err = table1.Get(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex1 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer1a) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer1a, entry.key.size())); + + // Retrieve fabric2, second entry + err = table1.Get(1, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex1 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer1b) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer1b, entry.key.size())); + + // Retrieve fabric2, first entry + err = table2.Get(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex2 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId21 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId22 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer2a) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer2a, entry.key.size())); +} + +void TestDeleteValidEntryFromStorage(nlTestSuite * aSuite, void * context) +{ + TestPersistentStorageDelegate storage; + IcdMonitoringTable table1(storage, kTestFabricIndex1, kMaxTestClients1); + IcdMonitoringTable table2(storage, kTestFabricIndex2, kMaxTestClients2); + IcdMonitoringEntry entry; + CHIP_ERROR err; + + // Insert first entry + entry.checkInNodeID = kClientNodeId11; + entry.monitoredSubject = kClientNodeId12; + entry.key = ByteSpan(kKeyBuffer1a); + err = table1.Set(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + // Insert second entry + entry.checkInNodeID = kClientNodeId12; + entry.monitoredSubject = kClientNodeId11; + entry.key = ByteSpan(kKeyBuffer2a); + err = table1.Set(1, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + // Insert in second fabric + entry.checkInNodeID = kClientNodeId21; + entry.monitoredSubject = kClientNodeId22; + entry.key = ByteSpan(kKeyBuffer2a); + err = table2.Set(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + // Remove (invalid) + err = table1.Remove(2); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR != err); + + // Retrieve fabric1 + err = table1.Get(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex1 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer1a) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer1a, entry.key.size())); + + // Retrieve second entry (not modified) + err = table1.Get(1, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex1 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer2a) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer2a, entry.key.size())); + + // Remove (existing) + err = table1.Remove(0); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + // Retrieve second entry (shifted down) + err = table1.Get(1, entry); + NL_TEST_ASSERT(aSuite, CHIP_ERROR_NOT_FOUND == err); + + err = table1.Get(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex1 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer2a) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer2a, entry.key.size())); + + // Retrieve fabric2, first entry + err = table2.Get(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex2 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId21 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId22 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer2a) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer2a, entry.key.size())); + + // Remove all (fabric 1) + err = table1.RemoveAll(); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + err = table1.Get(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_ERROR_NOT_FOUND == err); + + // Check fabric 2 + err = table2.Get(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(aSuite, kTestFabricIndex2 == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, kClientNodeId21 == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, kClientNodeId22 == entry.monitoredSubject); + NL_TEST_ASSERT(aSuite, sizeof(kKeyBuffer2a) == entry.key.size()); + NL_TEST_ASSERT(aSuite, 0 == memcmp(entry.key.data(), kKeyBuffer2a, entry.key.size())); + + // Remove all (fabric 2) + err = table2.RemoveAll(); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); + + err = table2.Get(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_ERROR_NOT_FOUND == err); +} + +} // namespace + +/** + * Set up the test suite. + */ +int Test_Setup(void * inContext) +{ + + return SUCCESS; +} + +int TestClientMonitoringRegistrationTable() +{ + static nlTest sTests[] = { + NL_TEST_DEF("TestSaveAndLoadRegistrationValue", TestSaveAndLoadRegistrationValue), + NL_TEST_DEF("TestSaveAllInvalidRegistrationValues", TestSaveAllInvalidRegistrationValues), + NL_TEST_DEF("TestSaveLoadRegistrationValueForMultipleFabrics", TestSaveLoadRegistrationValueForMultipleFabrics), + NL_TEST_DEF("TestDeleteValidEntryFromStorage", TestDeleteValidEntryFromStorage), NL_TEST_SENTINEL() + }; + + nlTestSuite cmSuite = { "TestClientMonitoringRegistrationTable", &sTests[0], &Test_Setup, nullptr }; + + nlTestRunner(&cmSuite, nullptr); + return (nlTestRunnerStats(&cmSuite)); +} + +CHIP_REGISTER_TEST_SUITE(TestClientMonitoringRegistrationTable) diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 249e5e991f83fa..5a5073f1f04059 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -468,7 +468,7 @@ void TestReadInteraction::TestReadClient(nlTestSuite * apSuite, void * apContext ctx.DrainAndServiceIO(); GenerateReportData(apSuite, apContext, buf, false /*aNeedInvalidReport*/, true /* aSuppressResponse*/); - err = readClient.ProcessReportData(std::move(buf)); + err = readClient.ProcessReportData(std::move(buf), ReadClient::ReportType::kContinuingTransaction); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } @@ -494,7 +494,7 @@ void TestReadInteraction::TestReadUnexpectedSubscriptionId(nlTestSuite * apSuite // For read, we don't expect there is subscription id in report data. GenerateReportData(apSuite, apContext, buf, false /*aNeedInvalidReport*/, true /* aSuppressResponse*/, true /*aHasSubscriptionId*/); - err = readClient.ProcessReportData(std::move(buf)); + err = readClient.ProcessReportData(std::move(buf), ReadClient::ReportType::kContinuingTransaction); NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_INVALID_ARGUMENT); } @@ -637,7 +637,7 @@ void TestReadInteraction::TestReadClientInvalidReport(nlTestSuite * apSuite, voi GenerateReportData(apSuite, apContext, buf, true /*aNeedInvalidReport*/, true /* aSuppressResponse*/); - err = readClient.ProcessReportData(std::move(buf)); + err = readClient.ProcessReportData(std::move(buf), ReadClient::ReportType::kContinuingTransaction); NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB); } @@ -4104,7 +4104,7 @@ void TestReadInteraction::TestSubscribeInvalidateFabric(nlTestSuite * apSuite, v readPrepareParams.mpAttributePathParamsList[0].mEndpointId = Test::kMockEndpoint3; readPrepareParams.mpAttributePathParamsList[0].mClusterId = Test::MockClusterId(2); - readPrepareParams.mpAttributePathParamsList[0].mAttributeId = Test::MockAttributeId(4); + readPrepareParams.mpAttributePathParamsList[0].mAttributeId = Test::MockAttributeId(1); readPrepareParams.mMinIntervalFloorSeconds = 0; readPrepareParams.mMaxIntervalCeilingSeconds = 0; @@ -4163,7 +4163,7 @@ void TestReadInteraction::TestShutdownSubscription(nlTestSuite * apSuite, void * readPrepareParams.mpAttributePathParamsList[0].mEndpointId = Test::kMockEndpoint3; readPrepareParams.mpAttributePathParamsList[0].mClusterId = Test::MockClusterId(2); - readPrepareParams.mpAttributePathParamsList[0].mAttributeId = Test::MockAttributeId(4); + readPrepareParams.mpAttributePathParamsList[0].mAttributeId = Test::MockAttributeId(1); readPrepareParams.mMinIntervalFloorSeconds = 0; readPrepareParams.mMaxIntervalCeilingSeconds = 0; @@ -4210,7 +4210,7 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AttributePathParams subscribePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(4)); + AttributePathParams subscribePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(1)); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); readPrepareParams.mpAttributePathParamsList = &subscribePath; @@ -4231,6 +4231,7 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * ctx.DrainAndServiceIO(); NL_TEST_ASSERT(apSuite, delegate.mGotReport); + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Read) == 0); NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().GetNumReportsInFlight() == 0); @@ -4244,12 +4245,14 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * // Test that we send reports as needed. readHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::HoldReport, false); - delegate.mGotReport = false; + delegate.mGotReport = false; + delegate.mNumAttributeResponse = 0; engine->GetReportingEngine().SetDirty(subscribePath); ctx.DrainAndServiceIO(); NL_TEST_ASSERT(apSuite, delegate.mGotReport); + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Read) == 0); NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().GetNumReportsInFlight() == 0); @@ -4258,12 +4261,14 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * // up properly. readHandler->GetSession()->MarkAsDefunct(); readHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::HoldReport, false); - delegate.mGotReport = false; + delegate.mGotReport = false; + delegate.mNumAttributeResponse = 0; engine->GetReportingEngine().SetDirty(subscribePath); ctx.DrainAndServiceIO(); NL_TEST_ASSERT(apSuite, !delegate.mGotReport); + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 0); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 0); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Read) == 0); NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().GetNumReportsInFlight() == 0); diff --git a/src/app/tests/TestSceneTable.cpp b/src/app/tests/TestSceneTable.cpp index 25808686828d16..8bbbdb350fb900 100644 --- a/src/app/tests/TestSceneTable.cpp +++ b/src/app/tests/TestSceneTable.cpp @@ -405,6 +405,8 @@ class TestSceneTableImpl : public SceneTableImpl return 0; } + + uint8_t GetClusterCountFromEndpoint() override { return 3; } }; // Storage diff --git a/src/app/tests/suites/TestAttributesById.yaml b/src/app/tests/suites/TestAttributesById.yaml new file mode 100644 index 00000000000000..7869be79518d82 --- /dev/null +++ b/src/app/tests/suites/TestAttributesById.yaml @@ -0,0 +1,280 @@ +# 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: Attributes Tests + +config: + nodeId: 0x12344321 + endpoint: 1 + cluster: "Unit Testing" + + UnsupportedCluster: 0xFFF1FC06 + UnsupportedAttribute: 0xFFF11FFF + UnsupportedEndPoint: 254 + + AttributeRequestMessage.Cluster: 0xFFF1FC05 + AttributeRequestMessage.Attribute: 0x0000 + AttributeRequestMessage.EndPoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "Read Request Message with a path that indicates a specific endpoint + that is unsupported" + cluster: "AnyCommands" + command: "ReadById" + endpoint: UnsupportedEndPoint + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + response: + error: UNSUPPORTED_ENDPOINT + + - label: + "Read Request Message with a path that indicates a specific cluster + that is unsupported" + cluster: "AnyCommands" + command: "ReadById" + endpoint: AttributeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: UnsupportedCluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + response: + error: UNSUPPORTED_CLUSTER + + - label: + "Read Request Message with a path that indicates a specific command + that is unsupported" + cluster: "AnyCommands" + command: "ReadById" + endpoint: AttributeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: UnsupportedAttribute + response: + error: UNSUPPORTED_ATTRIBUTE + + - label: + "Read Request Message with a valid path that indicates a specific + endpoint/cluster/attribute" + cluster: "AnyCommands" + command: "ReadById" + endpoint: AttributeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + response: + value: false + + - label: + "Write Request Message with a path that indicates a specific endpoint + that is unsupported" + cluster: "AnyCommands" + command: "WriteById" + endpoint: UnsupportedEndPoint + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + - name: "Value" + value: true + response: + error: UNSUPPORTED_ENDPOINT + + - label: + "Write Request Message with a path that indicates a specific cluster + that is unsupported" + cluster: "AnyCommands" + command: "WriteById" + endpoint: AttributeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: UnsupportedCluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + - name: "Value" + value: true + response: + error: UNSUPPORTED_CLUSTER + + - label: + "Write Request Message with a path that indicates a specific command + that is unsupported" + cluster: "AnyCommands" + command: "WriteById" + endpoint: AttributeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: UnsupportedAttribute + - name: "Value" + value: true + response: + error: UNSUPPORTED_ATTRIBUTE + + - label: + "Write Request Message with a valid path that indicates a specific + endpoint/cluster/attribute" + cluster: "AnyCommands" + command: "WriteById" + endpoint: AttributeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + - name: "Value" + value: true + + - label: + "Write Request Message with a valid path that indicates a specific + endpoint/cluster/attribute and set it back to defaults." + cluster: "AnyCommands" + command: "WriteById" + endpoint: AttributeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + - name: "Value" + value: false + + - label: + "Subscribe Request Message with a path that indicates a specific + endpoint that is unsupported" + cluster: "AnyCommands" + command: "SubscribeById" + endpoint: UnsupportedEndPoint + minInterval: 2 + maxInterval: 5 + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + response: + error: INVALID_ACTION + + - label: + "Subscribe Request Message with a path that indicates a specific + cluster that is unsupported" + cluster: "AnyCommands" + command: "SubscribeById" + endpoint: AttributeRequestMessage.EndPoint + minInterval: 2 + maxInterval: 5 + arguments: + values: + - name: "ClusterId" + value: UnsupportedCluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + response: + error: INVALID_ACTION + + - label: + "Subscribe Request Message with a path that indicates a specific + command that is unsupported" + cluster: "AnyCommands" + command: "SubscribeById" + endpoint: AttributeRequestMessage.EndPoint + minInterval: 2 + maxInterval: 5 + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: UnsupportedAttribute + response: + error: INVALID_ACTION + + - label: + "Subscribe Request Message with a valid path that indicates a specific + endpoint/cluster/attribute" + cluster: "AnyCommands" + command: "SubscribeById" + endpoint: AttributeRequestMessage.EndPoint + minInterval: 2 + maxInterval: 5 + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + + - label: + "Write Request Message with a valid path that indicates a specific + endpoint/cluster/attribute" + cluster: "AnyCommands" + command: "WriteById" + endpoint: AttributeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + - name: "Value" + value: true + + - label: "Check for attribute report" + command: "waitForReport" + attribute: "boolean" + response: + value: true + + - label: + "Write Request Message with a valid path that indicates a specific + endpoint/cluster/attribute and set it back to defaults." + cluster: "AnyCommands" + command: "WriteById" + endpoint: AttributeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: AttributeRequestMessage.Cluster + - name: "AttributeId" + value: AttributeRequestMessage.Attribute + - name: "Value" + value: false diff --git a/src/app/tests/suites/TestClientMonitoringCluster.yaml b/src/app/tests/suites/TestClientMonitoringCluster.yaml deleted file mode 100644 index 8376543a7893a5..00000000000000 --- a/src/app/tests/suites/TestClientMonitoringCluster.yaml +++ /dev/null @@ -1,102 +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: Client Monitoring Tests - -config: - nodeId: 0x12344321 - cluster: "Client Monitoring" - endpoint: 0 - -tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Register Client 2 - Invalid" - command: "RegisterClientMonitoring" - arguments: - values: - - name: "ClientNodeId" - value: 0 - - name: "ICid" - value: 0 - response: - error: FAILURE - - - label: "Register Client 1" - command: "RegisterClientMonitoring" - arguments: - values: - - name: "ClientNodeId" - value: 10 - - name: "ICid" - value: 20 - - - label: "Register Client 2 - Invalid" - command: "RegisterClientMonitoring" - arguments: - values: - - name: "ClientNodeId" - value: 11 - - name: "ICid" - value: 21 - response: - error: RESOURCE_EXHAUSTED - - - label: "Verify Register Client" - command: "readAttribute" - attribute: "ExpectedClients" - response: - value: [{ ClientNodeId: 10, ICid: 20 }] - - - label: "Unregister Client - Invalid Client NodeId" - command: "UnregisterClientMonitoring" - arguments: - values: - - name: "ClientNodeId" - value: 30 - - name: "ICid" - value: 20 - response: - error: FAILURE - - - label: "Unregister Client - Invalid ICid" - command: "UnregisterClientMonitoring" - arguments: - values: - - name: "ClientNodeId" - value: 10 - - name: "ICid" - value: 30 - response: - error: FAILURE - - - label: "Unregister Client - Valid" - command: "UnregisterClientMonitoring" - arguments: - values: - - name: "ClientNodeId" - value: 10 - - name: "ICid" - value: 20 - - - label: "Verify Register Client - Empty" - command: "readAttribute" - attribute: "ExpectedClients" - response: - value: [] diff --git a/src/app/tests/suites/TestCommandsById.yaml b/src/app/tests/suites/TestCommandsById.yaml new file mode 100644 index 00000000000000..a3aab2660ffc05 --- /dev/null +++ b/src/app/tests/suites/TestCommandsById.yaml @@ -0,0 +1,104 @@ +# 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: Commands Tests + +config: + nodeId: 0x12344321 + endpoint: 1 + cluster: "Unit Testing" + + UnsupportedCluster: 0xFFF11FFF + UnsupportedCommand: 0xFFF11FFF + UnsupportedEndPoint: 254 + + InvokeRequestMessage.Cluster: 0x00000006 + InvokeRequestMessage.Command: 0x00000000 + InvokeRequestMessage.EndPoint: 1 + InvokeRequestMessage.Payload: {} + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "Invoke Request Message with a path that indicates a specific endpoint + that is unsupported" + cluster: "AnyCommands" + command: "CommandById" + endpoint: UnsupportedEndPoint + arguments: + values: + - name: "ClusterId" + value: InvokeRequestMessage.Cluster + - name: "CommandId" + value: InvokeRequestMessage.Command + - name: "Payload" + value: InvokeRequestMessage.Payload + response: + error: UNSUPPORTED_ENDPOINT + + - label: + "Invoke Request Message with a path that indicates a specific cluster + that is unsupported" + cluster: "AnyCommands" + command: "CommandById" + endpoint: InvokeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: UnsupportedCluster + - name: "CommandId" + value: InvokeRequestMessage.Command + - name: "Payload" + value: InvokeRequestMessage.Payload + response: + error: UNSUPPORTED_CLUSTER + + - label: + "Invoke Request Message with a path that indicates a specific command + that is unsupported" + cluster: "AnyCommands" + command: "CommandById" + endpoint: InvokeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: InvokeRequestMessage.Cluster + - name: "CommandId" + value: UnsupportedCommand + - name: "Payload" + value: InvokeRequestMessage.Payload + response: + error: UNSUPPORTED_COMMAND + + - label: + "Invoke Request Message with a valid path that indicates a specific + endpoint/cluster/command" + cluster: "AnyCommands" + command: "CommandById" + endpoint: InvokeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: InvokeRequestMessage.Cluster + - name: "CommandId" + value: InvokeRequestMessage.Command + - name: "Payload" + value: InvokeRequestMessage.Payload diff --git a/src/app/tests/suites/TestEventsById.yaml b/src/app/tests/suites/TestEventsById.yaml new file mode 100644 index 00000000000000..29224f92e3e7ac --- /dev/null +++ b/src/app/tests/suites/TestEventsById.yaml @@ -0,0 +1,264 @@ +# 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: Events Tests + +config: + nodeId: 0x12344321 + endpoint: 1 + cluster: "Unit Testing" + + UnsupportedCluster: 0xFFF11FFF + UnsupportedEvent: 0xFFF11FFF + UnsupportedEndPoint: 254 + + ReadRequestMessage.Cluster: 0xFFF1FC05 + ReadRequestMessage.Event: 0x0001 + ReadRequestMessage.EndPoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "Read Request Message with a path that indicates a specific endpoint + that is unsupported" + cluster: "AnyCommands" + command: "ReadEventById" + endpoint: UnsupportedEndPoint + arguments: + values: + - name: "ClusterId" + value: ReadRequestMessage.Cluster + - name: "EventId" + value: ReadRequestMessage.Event + response: [] + + - label: + "Read Request Message with a path that indicates a specific cluster + that is unsupported" + cluster: "AnyCommands" + command: "ReadEventById" + endpoint: ReadRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: UnsupportedCluster + - name: "EventId" + value: ReadRequestMessage.Event + response: [] + + - label: + "Read Request Message with a path that indicates a specific endpoint + that is unsupported" + cluster: "AnyCommands" + command: "ReadEventById" + endpoint: ReadRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: ReadRequestMessage.Cluster + - name: "EventId" + value: UnsupportedEvent + response: [] + + - label: + "Read Request Message with a path that indicates an event with no + results" + cluster: "AnyCommands" + command: "ReadEventById" + endpoint: ReadRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: ReadRequestMessage.Cluster + - name: "EventId" + value: ReadRequestMessage.Event + response: [] + + - label: "Create an event on the accessory" + command: "TestEmitTestEventRequest" + endpoint: ReadRequestMessage.EndPoint + arguments: + values: + - name: "arg1" + value: 1 + - name: "arg2" + value: 2 + - name: "arg3" + value: true + response: + values: + - name: "value" + saveAs: eventNumber + + - label: "Read the event back" + cluster: "AnyCommands" + command: "ReadEventById" + endpoint: ReadRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: ReadRequestMessage.Cluster + - name: "EventId" + value: ReadRequestMessage.Event + response: + value: { arg1: 1, arg2: 2, arg3: true } + + - label: "Read the event with eventNumber set to the event value" + cluster: "AnyCommands" + command: "ReadEventById" + endpoint: ReadRequestMessage.EndPoint + eventNumber: eventNumber + arguments: + values: + - name: "ClusterId" + value: ReadRequestMessage.Cluster + - name: "EventId" + value: ReadRequestMessage.Event + response: + value: { arg1: 1, arg2: 2, arg3: true } + + - label: "Read the event with eventNumber set to the event value + 1" + cluster: "AnyCommands" + command: "ReadEventById" + endpoint: ReadRequestMessage.EndPoint + eventNumber: eventNumber + 1 + arguments: + values: + - name: "ClusterId" + value: ReadRequestMessage.Cluster + - name: "EventId" + value: ReadRequestMessage.Event + response: [] + + - label: "Generate a second event on the accessory" + command: "TestEmitTestEventRequest" + endpoint: ReadRequestMessage.EndPoint + arguments: + values: + - name: "arg1" + value: 3 + - name: "arg2" + value: 1 + - name: "arg3" + value: false + response: + values: + - name: "value" + value: eventNumber + 1 + + - label: "Read the event back" + cluster: "AnyCommands" + command: "ReadEventById" + endpoint: ReadRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: ReadRequestMessage.Cluster + - name: "EventId" + value: ReadRequestMessage.Event + response: + - values: + - value: { arg1: 1, arg2: 2, arg3: true } + - values: + - value: { arg1: 3, arg2: 1, arg3: false } + + - label: "Subscribe to the event" + cluster: "AnyCommands" + command: "SubscribeEventById" + endpoint: ReadRequestMessage.EndPoint + minInterval: 3 + maxInterval: 5 + arguments: + values: + - name: "ClusterId" + value: ReadRequestMessage.Cluster + - name: "EventId" + value: ReadRequestMessage.Event + response: + - values: + - value: { arg1: 1, arg2: 2, arg3: true } + - values: + - value: { arg1: 3, arg2: 1, arg3: false } + + - label: "Generate a third event on the accessory" + command: "TestEmitTestEventRequest" + endpoint: ReadRequestMessage.EndPoint + arguments: + values: + - name: "arg1" + value: 4 + - name: "arg2" + value: 3 + - name: "arg3" + value: true + response: + values: + - name: "value" + value: eventNumber + 2 + + - label: "Check for event report" + command: "waitForReport" + event: "TestEvent" + endpoint: ReadRequestMessage.EndPoint + response: + values: + - name: "TestEvent" + value: { arg1: 4, arg2: 3, arg3: true } + + - label: + "Read Request Message with a path that indicates a specific + endpoint/cluster and a wildcard event" + cluster: "AnyCommands" + command: "ReadEventById" + endpoint: ReadRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: ReadRequestMessage.Cluster + - name: "EventId" + value: "*" + response: + - values: + - value: { arg1: 1, arg2: 2, arg3: true } + - values: + - value: { arg1: 3, arg2: 1, arg3: false } + - values: + - value: { arg1: 4, arg2: 3, arg3: true } + + - label: + "Read Request Message with a path that indicates a specific + endpoint/event and a wildcard cluster" + cluster: "AnyCommands" + command: "ReadEventById" + endpoint: ReadRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: "*" + - name: "EventId" + value: ReadRequestMessage.EndPoint + response: + - values: + - value: { arg1: 1, arg2: 2, arg3: true } + - values: + - value: { arg1: 3, arg2: 1, arg3: false } + - values: + - value: { arg1: 4, arg2: 3, arg3: true } diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index 4aedb61d7e28ee..bc1091050d828a 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -190,13 +190,14 @@ tests: EpochStartTime2: 1110002, } - - label: "KeySet Read All Indicers" - disabled: true + - label: "KeySet Read All Indices" command: "KeySetReadAllIndices" response: values: - name: "GroupKeySetIDs" - value: [0x01a1, 0x01a2] + constraints: + # Note: There's always an IPK keyset with index 0 + contains: [0x01a1, 0x01a2, 0] - label: "Write Group Keys (invalid)" command: "writeAttribute" diff --git a/src/app/tests/suites/TestIcdManagementCluster.yaml b/src/app/tests/suites/TestIcdManagementCluster.yaml new file mode 100644 index 00000000000000..985e943df5057f --- /dev/null +++ b/src/app/tests/suites/TestIcdManagementCluster.yaml @@ -0,0 +1,304 @@ +# 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: ICD Management Cluster Tests + +config: + nodeId: 0x12344321 + cluster: "ICD Management" + endpoint: 0 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Read IdleModeInterval" + command: "readAttribute" + attribute: "IdleModeInterval" + response: + value: 500 + + - label: "Read ActiveModeInterval" + command: "readAttribute" + attribute: "ActiveModeInterval" + response: + value: 300 + + - label: "Read ActiveModeThreshold" + command: "readAttribute" + attribute: "ActiveModeThreshold" + response: + value: 300 + + - label: "Read ICDCounter" + command: "readAttribute" + attribute: "ICDCounter" + response: + value: 0 + + - label: "Read ClientsSupportedPerFabric" + command: "readAttribute" + attribute: "ClientsSupportedPerFabric" + response: + value: 2 + + - label: "Unregister 1.0" + command: "UnregisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 101 + response: + error: NOT_FOUND + + - label: "Unregister 2.0" + command: "UnregisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 102 + response: + error: NOT_FOUND + + - label: "Unregister 3.0" + command: "UnregisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 102 + response: + error: NOT_FOUND + + - label: "Read RegisteredClients" + command: "readAttribute" + attribute: "RegisteredClients" + response: + value: [] + + - label: "Register 1.0 (key too short)" + command: "RegisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 101 + - name: "MonitoredSubject" + value: 1001 + - name: "Key" + value: "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e" + response: + error: CONSTRAINT_ERROR + + - label: "Register 1.0 (key too long)" + command: "RegisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 101 + - name: "MonitoredSubject" + value: 1001 + - name: "Key" + value: "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\xff" + response: + error: CONSTRAINT_ERROR + + - label: "Register 1.1" + command: "RegisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 101 + - name: "MonitoredSubject" + value: 1001 + - name: "Key" + value: "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" + response: + values: + - name: "ICDCounter" + value: 0 + + - label: "Register 2.1" + command: "RegisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 201 + - name: "MonitoredSubject" + value: 2001 + - name: "Key" + value: + "\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f" + response: + values: + - name: "ICDCounter" + value: 0 + + - label: "Register 3.1" + command: "RegisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 301 + - name: "MonitoredSubject" + value: 3001 + - name: "Key" + value: "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" + response: + error: RESOURCE_EXHAUSTED + + - label: "Read RegisteredClients" + command: "readAttribute" + attribute: "RegisteredClients" + response: + value: + [ + { + CheckInNodeID: 101, + MonitoredSubject: 1001, + Key: "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f", + }, + { + CheckInNodeID: 201, + MonitoredSubject: 2001, + Key: + "\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f", + }, + ] + + - label: "Register 1.1" + command: "RegisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 101 + - name: "MonitoredSubject" + value: 1002 + - name: "Key" + value: "\x01\x11\x21\x31\x41\x51\x61\x71\x81\x91\xa1\xb1\xc1\xd1\xe1\xf1" + response: + values: + - name: "ICDCounter" + value: 0 + + - label: "Read RegisteredClients" + command: "readAttribute" + attribute: "RegisteredClients" + response: + value: + [ + { + CheckInNodeID: 101, + MonitoredSubject: 1002, + Key: "\x01\x11\x21\x31\x41\x51\x61\x71\x81\x91\xa1\xb1\xc1\xd1\xe1\xf1", + }, + { + CheckInNodeID: 201, + MonitoredSubject: 2001, + Key: + "\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f", + }, + ] + + - label: "Register 2.2 (wrong verification key)" + command: "RegisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 201 + - name: "MonitoredSubject" + value: 2002 + - name: "Key" + value: "\x02\x12\x22\x32\x42\x52\x62\x72\x82\x92\xa2\xb2\xc2\xd2\xe2\x2f" + - name: "VerificationKey" + value: + "\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2f\x2f" + response: + values: + - name: "ICDCounter" + value: 0 + + - label: "Read RegisteredClients" + command: "readAttribute" + attribute: "RegisteredClients" + response: + value: + [ + { + CheckInNodeID: 101, + MonitoredSubject: 1002, + Key: "\x01\x11\x21\x31\x41\x51\x61\x71\x81\x91\xa1\xb1\xc1\xd1\xe1\xf1", + }, + { + CheckInNodeID: 201, + MonitoredSubject: 2002, + Key: "\x02\x12\x22\x32\x42\x52\x62\x72\x82\x92\xa2\xb2\xc2\xd2\xe2\x2f", + }, + ] + + - label: "Unregister 1.1 (wrong key)" + command: "UnregisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 101 + - name: "Key" + value: "\x01\x21\x21\x31\x41\x51\x61\x71\x81\x91\xa1\xb1\xc1\xd1\xe1\xf1" + + - label: "Read RegisteredClients" + command: "readAttribute" + attribute: "RegisteredClients" + response: + value: + [ + { + CheckInNodeID: 201, + MonitoredSubject: 2002, + Key: "\x02\x12\x22\x32\x42\x52\x62\x72\x82\x92\xa2\xb2\xc2\xd2\xe2\x2f", + }, + ] + + - label: "Unregister 2.1" + command: "UnregisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 201 + + - label: "Read RegisteredClients" + command: "readAttribute" + attribute: "RegisteredClients" + response: + value: [] + + - label: "Unregister 1.3" + command: "UnregisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 101 + response: + error: NOT_FOUND + + - label: "Unregister 2.2" + command: "UnregisterClient" + arguments: + values: + - name: "CheckInNodeID" + value: 102 + response: + error: NOT_FOUND diff --git a/src/app/tests/suites/TestModeSelectCluster.yaml b/src/app/tests/suites/TestModeSelectCluster.yaml index 3df5462041b374..17b5a4cb3876a6 100644 --- a/src/app/tests/suites/TestModeSelectCluster.yaml +++ b/src/app/tests/suites/TestModeSelectCluster.yaml @@ -33,29 +33,15 @@ tests: response: value: "Coffee" - - label: "Read StandardNamespace" - command: "readAttribute" - attribute: "StandardNamespace" - response: - value: 0 - - label: "Read SupportedModes" command: "readAttribute" attribute: "SupportedModes" response: value: [ - { Label: "Black", Mode: 0, SemanticTags: [{ "Value": 0 }] }, - { - Label: "Cappuccino", - Mode: 4, - SemanticTags: [{ "Value": 0 }], - }, - { - Label: "Espresso", - Mode: 7, - SemanticTags: [{ "Value": 0 }], - }, + { Label: "Black", Mode: 0, ModeTags: [{ "Value": 0 }] }, + { Label: "Cappuccino", Mode: 4, ModeTags: [{ "Value": 0 }] }, + { Label: "Espresso", Mode: 7, ModeTags: [{ "Value": 0 }] }, ] constraints: type: list diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 1d588af8f3050c..0cab61e18fdc61 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -42,6 +42,7 @@ "TestColorControl_9_2" ], "DeviceManagement": [ + "TestIcdManagementCluster", "Test_TC_OPCREDS_1_2", "Test_TC_BINFO_1_1", "Test_TC_BINFO_2_1", diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp index 542f4ffd29368f..c6c68441a127d4 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp @@ -318,13 +318,13 @@ CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::v std::vector clusterIds, std::vector attributeIds, ReadClient::InteractionType interactionType) { + ChipLogProgress(chipTool, + "Sending %sAttribute to:", interactionType == ReadClient::InteractionType::Subscribe ? "Subscribe" : "Read"); + InteractionModelConfig::AttributePathsConfig pathsConfig; ReturnErrorOnFailure( InteractionModelConfig::GetAttributePaths(endpointIds, clusterIds, attributeIds, mDataVersions, pathsConfig)); - ChipLogProgress(chipTool, - "Sending %sAttribute to:", interactionType == ReadClient::InteractionType::Subscribe ? "Subscribe" : "Read"); - ReadPrepareParams params(device->GetSecureSession().Value()); params.mpEventPathParamsList = nullptr; params.mEventPathParamsListSize = 0; diff --git a/src/app/util/ClientMonitoringRegistrationTable.cpp b/src/app/util/ClientMonitoringRegistrationTable.cpp deleted file mode 100644 index bfe81a7ddf77d9..00000000000000 --- a/src/app/util/ClientMonitoringRegistrationTable.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/** - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Disable CM cluster table until update is done -// https://github.com/project-chip/connectedhomeip/issues/24425 -#if 0 -#include "ClientMonitoringRegistrationTable.h" - -#include - -namespace chip { - -/********************************************************** - * ClientMonitoringRegistrationTable Implementation - *********************************************************/ - -ClientMonitoringRegistrationTable::ClientMonitoringRegistrationTable(PersistentStorageDelegate & storage) : mStorage(storage) {} - -CHIP_ERROR ClientMonitoringRegistrationTable::LoadFromStorage(FabricIndex fabricIndex) -{ - uint8_t buffer[kRegStorageSize] = { 0 }; - uint16_t size = sizeof(buffer); - - ReturnErrorOnFailure( - mStorage.SyncGetKeyValue(DefaultStorageKeyAllocator::ClientMonitoringTableEntry(fabricIndex).KeyName(), buffer, size)); - - TLV::TLVReader reader; - reader.Init(buffer, size); - ReturnErrorOnFailure(reader.Next(TLV::kTLVType_Structure, TLV::AnonymousTag())); - - ReturnErrorOnFailure(mRegisteredClient.Decode(reader)); - - mRegisteredClient.fabricIndex = fabricIndex; - - return CHIP_NO_ERROR; -} - -CHIP_ERROR ClientMonitoringRegistrationTable::SaveToStorage() -{ - VerifyOrReturnError(mRegisteredClient.IsValid(), CHIP_ERROR_INCORRECT_STATE); - - uint8_t buffer[kRegStorageSize] = { 0 }; - TLV::TLVWriter writer; - - writer.Init(buffer); - ReturnErrorOnFailure(mRegisteredClient.EncodeForWrite(writer, TLV::AnonymousTag())); - ReturnErrorOnFailure(writer.Finalize()); - - return mStorage.SyncSetKeyValue(DefaultStorageKeyAllocator::ClientMonitoringTableEntry(mRegisteredClient.fabricIndex).KeyName(), - buffer, static_cast(writer.GetLengthWritten())); -} - -ClientMonitoringRegistrationTable::ClientRegistrationEntry & ClientMonitoringRegistrationTable::GetClientRegistrationEntry() -{ - return mRegisteredClient; -} - -CHIP_ERROR ClientMonitoringRegistrationTable::DeleteFromStorage(FabricIndex fabric) -{ - return mStorage.SyncDeleteKeyValue(DefaultStorageKeyAllocator::ClientMonitoringTableEntry(fabric).KeyName()); -} - -bool ClientMonitoringRegistrationTable::HasValueForFabric(FabricIndex fabric) -{ - return mStorage.SyncDoesKeyExist(DefaultStorageKeyAllocator::ClientMonitoringTableEntry(fabric).KeyName()); -} - -} // namespace chip -#endif diff --git a/src/app/util/ClientMonitoringRegistrationTable.h b/src/app/util/ClientMonitoringRegistrationTable.h deleted file mode 100644 index 51886e8527e34a..00000000000000 --- a/src/app/util/ClientMonitoringRegistrationTable.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Disable CM cluster table until update is done -// https://github.com/project-chip/connectedhomeip/issues/24425 -#if 0 -#pragma once - -#include -#include -#include -#include -#include - -namespace chip { - -/** - * @brief ClientMonitoringRegistrationTable exists to manage the persistence of entries in the ClientMonitoring Cluster. - * To access persisted data with the ClientMonitoringRegistrationTable class, instantiate an instance of this class - * and call the LoadFromStorage function. - * - * This class can only manage one fabric at a time. The flow is load a fabric, execute necessary operations, - * save it if there are any changes and load another fabric. - * - * Issue to refactor the class to use one entry for the entire table - * https://github.com/project-chip/connectedhomeip/issues/24288 - */ -class ClientMonitoringRegistrationTable -{ -public: - using MonitoringRegistrationStruct = chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::Type; - - struct ClientRegistrationEntry : MonitoringRegistrationStruct - { - bool IsValid() { return clientNodeId != kUndefinedNodeId && ICid != kInvalidIcId && fabricIndex != kUndefinedFabricIndex; } - }; - - ClientMonitoringRegistrationTable(PersistentStorageDelegate & storage); - - /** - * @brief Function saves the mRegisteredClient attribute to persitant storage - * To correctly persit an entry, the values must be stored in the structures attributes - * - * @return CHIP_ERROR - */ - CHIP_ERROR SaveToStorage(); - - /** - * @brief Function loads a client registration entry from persistent storage for a single fabric - * - * @param[in] fabricIndex fabric index to load from storage - * @return CHIP_ERROR - */ - CHIP_ERROR LoadFromStorage(FabricIndex fabricIndex); - - /** - * @brief Function deletes a client registration entry from persistent storage for a single fabric - * - * @param[in] fabricIndex fabric index to delete from storage - * @return CHIP_ERROR - */ - CHIP_ERROR DeleteFromStorage(FabricIndex fabricIndex); - - /** - * @brief Function check if a client registration entry is stored for a single fabric - * - * @param[in] fabricIndex fabric index to check - * @return CHIP_ERROR - */ - bool HasValueForFabric(FabricIndex fabric); - - /** - * @brief Accessor function that returns the client registration entry that was loaded for a fabric from persistant storage. - * @see LoadFromStorage - * - * @return ClientMonitoringRegistrationTable::ClientRegistrationEntry& - */ - ClientRegistrationEntry & GetClientRegistrationEntry(); - -private: - static constexpr uint8_t kRegStorageSize = TLV::EstimateStructOverhead(sizeof(NodeId), sizeof(uint64_t)); - - ClientRegistrationEntry mRegisteredClient; - PersistentStorageDelegate & mStorage; -}; - -} // namespace chip -#endif diff --git a/src/app/util/IcdMonitoringTable.cpp b/src/app/util/IcdMonitoringTable.cpp new file mode 100644 index 00000000000000..2f208812db74f2 --- /dev/null +++ b/src/app/util/IcdMonitoringTable.cpp @@ -0,0 +1,111 @@ +#include "IcdMonitoringTable.h" +#include + +namespace chip { + +CHIP_ERROR IcdMonitoringEntry::UpdateKey(StorageKeyName & skey) +{ + VerifyOrReturnError(kUndefinedFabricIndex != this->fabricIndex, CHIP_ERROR_INVALID_FABRIC_INDEX); + skey = DefaultStorageKeyAllocator::IcdManagementTableEntry(this->fabricIndex, index); + return CHIP_NO_ERROR; +} + +CHIP_ERROR IcdMonitoringEntry::Serialize(TLV::TLVWriter & writer) const +{ + return this->EncodeForWrite(writer, TLV::AnonymousTag()); +} + +CHIP_ERROR IcdMonitoringEntry::Deserialize(TLV::TLVReader & reader) +{ + ReturnErrorOnFailure(reader.Next(TLV::AnonymousTag())); + return this->Decode(reader); +} + +void IcdMonitoringEntry::Clear() +{ + this->checkInNodeID = kUndefinedNodeId; + this->monitoredSubject = kUndefinedNodeId; + this->key = ByteSpan(); +} + +CHIP_ERROR IcdMonitoringTable::Get(uint16_t index, IcdMonitoringEntry & entry) const +{ + entry.fabricIndex = this->mFabric; + entry.index = index; + ReturnErrorOnFailure(entry.Load(this->mStorage)); + entry.fabricIndex = this->mFabric; + return CHIP_NO_ERROR; +} + +CHIP_ERROR IcdMonitoringTable::Find(NodeId id, IcdMonitoringEntry & entry) +{ + uint16_t index = 0; + while (index < this->Limit()) + { + ReturnErrorOnFailure(this->Get(index++, entry)); + if (id == entry.checkInNodeID) + { + return CHIP_NO_ERROR; + } + } + entry.index = index; + return CHIP_ERROR_NOT_FOUND; +} + +CHIP_ERROR IcdMonitoringTable::Set(uint16_t index, const IcdMonitoringEntry & entry) +{ + VerifyOrReturnError(index < this->Limit(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(kUndefinedNodeId != entry.checkInNodeID, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(kUndefinedNodeId != entry.monitoredSubject, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(entry.key.size() == IcdMonitoringEntry::kKeyMaxSize, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(nullptr != entry.key.data(), CHIP_ERROR_INVALID_ARGUMENT); + IcdMonitoringEntry e(this->mFabric, index); + e.checkInNodeID = entry.checkInNodeID; + e.monitoredSubject = entry.monitoredSubject; + e.key = entry.key; + e.index = index; + return e.Save(this->mStorage); +} + +CHIP_ERROR IcdMonitoringTable::Remove(uint16_t index) +{ + IcdMonitoringEntry entry(this->mFabric, index); + + // Shift remaining entries down one position + while (CHIP_NO_ERROR == this->Get(static_cast(index + 1), entry)) + { + // WARNING: The key data is held in the entry's serializing buffer + IcdMonitoringEntry copy = entry; + this->Set(index++, copy); + } + + // Remove last entry + entry.fabricIndex = this->mFabric; + entry.index = index; + return entry.Delete(this->mStorage); +} + +CHIP_ERROR IcdMonitoringTable::RemoveAll() +{ + IcdMonitoringEntry entry(this->mFabric); + uint16_t index = 0; + while (index < this->Limit()) + { + CHIP_ERROR err = this->Get(index++, entry); + if (CHIP_ERROR_NOT_FOUND == err) + { + break; + } + ReturnErrorOnFailure(err); + entry.fabricIndex = this->mFabric; + entry.Delete(this->mStorage); + } + return CHIP_NO_ERROR; +} + +uint16_t IcdMonitoringTable::Limit() const +{ + return mLimit; +} + +} // namespace chip diff --git a/src/app/util/IcdMonitoringTable.h b/src/app/util/IcdMonitoringTable.h new file mode 100644 index 00000000000000..b488d515759df8 --- /dev/null +++ b/src/app/util/IcdMonitoringTable.h @@ -0,0 +1,124 @@ +/** + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace chip { + +constexpr size_t kIcdMonitoringBufferSize = 40; + +struct IcdMonitoringEntry : public PersistentData, + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::Type +{ + static constexpr size_t kKeyMaxSize = 16; + + IcdMonitoringEntry(FabricIndex fabric = kUndefinedFabricIndex, NodeId nodeId = kUndefinedNodeId) + { + this->fabricIndex = fabric; + this->checkInNodeID = nodeId; + this->monitoredSubject = nodeId; + } + bool IsValid() { return this->checkInNodeID != kUndefinedNodeId && this->fabricIndex != kUndefinedFabricIndex; } + + CHIP_ERROR UpdateKey(StorageKeyName & key) override; + CHIP_ERROR Serialize(TLV::TLVWriter & writer) const override; + CHIP_ERROR Deserialize(TLV::TLVReader & reader) override; + void Clear() override; + + uint16_t index = 0; +}; + +/** + * @brief IcdMonitoringTable exists to manage the persistence of entries in the IcdManagement Cluster. + * To access persisted data with the IcdMonitoringTable class, instantiate an instance of this class + * and call the LoadFromStorage function. + * + * This class can only manage one fabric at a time. The flow is load a fabric, execute necessary operations, + * save it if there are any changes and load another fabric. + * + * Issue to refactor the class to use one entry for the entire table + * https://github.com/project-chip/connectedhomeip/issues/24288 + */ + +struct IcdMonitoringTable +{ + IcdMonitoringTable(PersistentStorageDelegate & storage, FabricIndex fabric, uint16_t limit) : + mStorage(&storage), mFabric(fabric), mLimit(limit) + {} + + /** + * @brief Returns the MonitoringRegistrationStruct entry at the given position. + * @param index Zero-based position within the RegisteredClients table. + * @param entry On success, contains the MonitoringRegistrationStruct matching the given index. + * @return CHIP_NO_ERROR on success, + * CHIP_ERROR_NOT_FOUND if index is greater than the index of the last entry on the table. + */ + CHIP_ERROR Get(uint16_t index, IcdMonitoringEntry & entry) const; + + /** + * @brief Stores the MonitoringRegistrationStruct entry at the given position, + * overwriting any existing entry. + * @param index Zero-based position within the RegisteredClients table. + * @param entry On success, contains the MonitoringRegistrationStruct matching the given index. + * @return CHIP_NO_ERROR on success + */ + CHIP_ERROR Set(uint16_t index, const IcdMonitoringEntry & entry); + + /** + * @brief Search the registered clients for an entry on the fabric whose checkInNodeID matches the given id. + * @param id NodeId to match. + * @param entry On success, contains the MonitoringRegistrationStruct matching the given node ID. + * If found, entry.index contains the position of the entry in the table. + * If CHIP_ERROR_NOT_FOUND is returned, entry.index contains the total number of entries in the table. + * @return CHIP_NO_ERROR if found, CHIP_ERROR_NOT_FOUND if no checkInNodeID matches the provided id. + */ + CHIP_ERROR Find(NodeId id, IcdMonitoringEntry & entry); + + /** + * @brief Removes the MonitoringRegistrationStruct entry at the given position, + * shifting down the upper entries. + * @param index Zero-based position within the RegisteredClients table. + * @return CHIP_NO_ERROR on success + */ + CHIP_ERROR Remove(uint16_t index); + + /** + * @brief Removes all the entries for the current fabricIndex. + * @return CHIP_NO_ERROR on success + */ + CHIP_ERROR RemoveAll(); + + /** + * @return Maximum number of entries allowed in the RegisteredClients table. + */ + uint16_t Limit() const; + +private: + PersistentStorageDelegate * mStorage; + FabricIndex mFabric; + uint16_t mLimit = 0; +}; + +} // namespace chip diff --git a/src/app/util/af.h b/src/app/util/af.h index 76bf8b4da08855..971f6b89dfe45b 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -149,50 +149,18 @@ uint16_t emberAfIndexFromEndpoint(chip::EndpointId endpoint); */ uint16_t emberAfIndexFromEndpointIncludingDisabledEndpoints(chip::EndpointId endpoint); -/** - * Returns the index of the given endpoint in the list of all defined endpoints - * (including disabled ones) that support the given cluster. - * - * Returns kEmberInvalidEndpointIndex if the given endpoint does not support the - * given cluster. - * - * For fixed endpoints, the returned value never changes, but for dynamic - * endpoints it can change if a dynamic endpoint is defined at a lower index - * that also supports the given cluster. - * - * For example, if a device has 4 fixed endpoints (ids 0-3) and 2 dynamic - * endpoints, and cluster X is supported on endpoints 1 and 3, then: - * - * 1) emberAfFindClusterServerEndpointIndex(0, X) returns kEmberInvalidEndpointIndex - * 2) emberAfFindClusterServerEndpointIndex(1, X) returns 0 - * 3) emberAfFindClusterServerEndpointIndex(2, X) returns kEmberInvalidEndpointIndex - * 4) emberAfFindClusterServerEndpointIndex(3, X) returns 1 - * - * If the second dynamic endpoint is defined (via - * emberAfSetDynamicEndpoint(1, 7, ...)) to - * have endpoint id 7, and supports cluster X, but the first dynamic endpoint is - * not defined, then emberAfFindClusterServerEndpointIndex(7, X) returns 2. - * - * If now the first dynamic endpoint is defined (via - * emberAfSetDynamicEndpoint(0, 9, ...)) - * to have endpoint id 9, and supports cluster X, then - * emberAfFindClusterServerEndpointIndex(7, X) starts returning 3 and - * emberAfFindClusterServerEndpointIndex(9, X) returns 2. - */ -uint16_t emberAfFindClusterServerEndpointIndex(chip::EndpointId endpoint, chip::ClusterId clusterId); - /** * @brief Returns the index of the given endpoint in the list of all endpoints that might support the given cluster server. * * Returns kEmberInvalidEndpointIndex if the given endpoint does not support the * given cluster or if the given endpoint is disabled. * - * Unlike emberAfFindClusterServerEndpointIndex, this function always returns the same index - * for a given endpointId instance, fixed or dynamic, if it does not return kEmberInvalidEndpointIndex. + * This function always returns the same index for a given endpointId instance, fixed or dynamic. * - * The return index is identical to emberAfFindClusterServerEndpointIndex for fixed endpoints, - * but for dynamic endpoints the indexing assumes that any dynamic endpoint could start supporting - * the given server cluster. + * The return index for fixed endpoints will range from 0 to (fixedClusterServerEndpointCount - 1), + * For dynamic endpoints the indexing assumes that any dynamic endpoint could start supporting + * the given server cluster and their index will range from fixedClusterServerEndpointCount to + * (fixedClusterServerEndpointCount + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT - 1). * * For example, if a device has 4 fixed endpoints (ids 0-3) and 2 dynamic * endpoints, and cluster X is supported on endpoints 1 and 3, then diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index bbef9d492e807b..13a856b043fcab 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -121,14 +121,6 @@ DataVersion fixedEndpointDataVersions[ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT]; app::AttributeAccessInterface * gAttributeAccessOverrides = nullptr; } // anonymous namespace -//------------------------------------------------------------------------------ -// Forward declarations - -// Returns endpoint index within a given cluster -static uint16_t findClusterEndpointIndex(EndpointId endpoint, ClusterId clusterId, uint8_t mask); - -//------------------------------------------------------------------------------ - // Initial configuration void emberAfEndpointConfigure() { @@ -825,40 +817,6 @@ const EmberAfCluster * emberAfFindClusterIncludingDisabledEndpoints(EndpointId e return nullptr; } -// Server wrapper for findClusterEndpointIndex -uint16_t emberAfFindClusterServerEndpointIndex(EndpointId endpoint, ClusterId clusterId) -{ - return findClusterEndpointIndex(endpoint, clusterId, CLUSTER_MASK_SERVER); -} - -// Returns the endpoint index within a given cluster -static uint16_t findClusterEndpointIndex(EndpointId endpoint, ClusterId clusterId, uint8_t mask) -{ - uint16_t i, epi = 0; - - if (emberAfFindServerCluster(endpoint, clusterId) == nullptr) - { - return kEmberInvalidEndpointIndex; - } - - for (i = 0; i < emberAfEndpointCount(); i++) - { - if (emAfEndpoints[i].endpoint == endpoint) - { - break; - } - if (emAfEndpoints[i].endpoint == kInvalidEndpointId) - { - // Not actually a configured endpoint. - continue; - } - epi = static_cast( - epi + ((emberAfFindClusterIncludingDisabledEndpoints(emAfEndpoints[i].endpoint, clusterId, mask) != nullptr) ? 1 : 0)); - } - - return epi; -} - static uint16_t findIndexFromEndpoint(EndpointId endpoint, bool ignoreDisabledEndpoints) { if (endpoint == kInvalidEndpointId) diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index d763f5646a8cfa..208ddec7b523e4 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -116,7 +116,7 @@ uint16_t emberAfIndexFromEndpoint(chip::EndpointId endpoint) return UINT16_MAX; } -uint8_t emberAfClusterCount(chip::EndpointId endpoint, bool server) +uint8_t emberAfGetClusterCountForEndpoint(chip::EndpointId endpoint) { for (size_t i = 0; i < ArraySize(endpoints); i++) { @@ -128,6 +128,11 @@ uint8_t emberAfClusterCount(chip::EndpointId endpoint, bool server) return 0; } +uint8_t emberAfClusterCount(chip::EndpointId endpoint, bool server) +{ + return emberAfGetClusterCountForEndpoint(endpoint); +} + uint16_t emberAfGetServerAttributeCount(chip::EndpointId endpoint, chip::ClusterId cluster) { uint16_t endpointIndex = emberAfIndexFromEndpoint(endpoint); diff --git a/src/app/zap-templates/zcl/data-model/all.xml b/src/app/zap-templates/zcl/data-model/all.xml index d0f256128e19a4..849921d488c814 100644 --- a/src/app/zap-templates/zcl/data-model/all.xml +++ b/src/app/zap-templates/zcl/data-model/all.xml @@ -21,6 +21,7 @@ + @@ -37,6 +38,7 @@ + @@ -55,7 +57,11 @@ + + + + @@ -73,6 +79,7 @@ + diff --git a/src/app/zap-templates/zcl/data-model/chip/chip-types.xml b/src/app/zap-templates/zcl/data-model/chip/chip-types.xml index e50f51f6fd9a18..2e8f2bf400fae2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/chip-types.xml +++ b/src/app/zap-templates/zcl/data-model/chip/chip-types.xml @@ -65,7 +65,7 @@ limitations under the License. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-select-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-select-cluster.xml new file mode 100644 index 00000000000000..5814edebd43452 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-select-cluster.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + General + Dishwasher Mode Select + 0x0059 + DISHWASHER_MODE_SELECT_CLUSTER + true + true + This cluster is an alias of the Mode Select cluster, defining additional semantics and + namespaced enumerated values for dishwasher devices. + + + Description + SupportedModes + CurrentMode + StartUpMode + OnMode + + + + + If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. + + + + + + + This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + + + + + + + This command is sent by the device on receipt of the ChangeToModeWithStatus command. + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml index 3b4961ea816505..9c4fe41cd058d9 100644 --- a/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml @@ -90,7 +90,6 @@ limitations under the License. Return the list of Group Key Sets associated with the accessing fabric - diff --git a/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-select-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-select-cluster.xml new file mode 100644 index 00000000000000..52cc7039d5c621 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-select-cluster.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + General + Laundry Washer Mode Select + 0x0051 + LAUNDRY_WASHER_MODE_SELECT_CLUSTER + true + true + This cluster is an alias of the Mode Select cluster, defining additional semantics and + namespaced enumerated values for laundry washer devices. + + + Description + SupportedModes + CurrentMode + StartUpMode + OnMode + + + + + If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. + + + + + + + This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + + + + + + + This command is sent by the device on receipt of the ChangeToModeWithStatus command. + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml index 9cdf36f0149f5f..3df49aa9cdff84 100644 --- a/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml @@ -17,17 +17,50 @@ limitations under the License. - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -38,26 +71,52 @@ limitations under the License. true true Attributes and commands for selecting a mode from a list of supported options. + - Description - StandardNamespace - SupportedModes - CurrentMode - StartUpMode - OnMode - - + Description + + StandardNamespace + SupportedModes + CurrentMode + StartUpMode + OnMode + + - On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. + + + + + + + This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + + + + + + + This command is sent by the device on receipt of the ChangeToModeWithStatus command. - + + - + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml b/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml index 3a3215addba19f..da478ae2347961 100644 --- a/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml +++ b/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml @@ -28,16 +28,9 @@ limitations under the License. REFRIGERATOR_ALARM true true - Mask - Latch + Mask State - - Reset alarm - - - - Notify diff --git a/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-select-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-select-cluster.xml new file mode 100644 index 00000000000000..965dae53507ec4 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-select-cluster.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + General + Refrigerator And Temperature Controlled Cabinet Mode Select + 0x0052 + REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER + true + true + This cluster is an alias of the Mode Select cluster, defining additional semantics and + namespaced enumerated values for refrigerator and temperature controlled cabinet devices. + + + Description + SupportedModes + CurrentMode + StartUpMode + OnMode + + + + + If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. + + + + + + + This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + + + + + + + This command is sent by the device on receipt of the ChangeToModeWithStatus command. + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-select-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-select-cluster.xml new file mode 100644 index 00000000000000..9dcdc5e89dc569 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-select-cluster.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + General + RVC Clean Mode Select + 0x0055 + RVC_CLEAN_MODE_SELECT_CLUSTER + true + true + This cluster is an alias of the Mode Select cluster which also defines a namespace for the + cleaning type of the Robotic Vacuum Cleaner devices. + + + Description + SupportedModes + CurrentMode + StartUpMode + OnMode + + + + + If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. + + + + + + + This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + + + + + + + This command is sent by the device on receipt of the ChangeToModeWithStatus command. + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-select-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-select-cluster.xml new file mode 100644 index 00000000000000..6e1483d0be074b --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-select-cluster.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + General + RVC Run Mode Select + 0x0054 + RVC_RUN_MODE_SELECT_CLUSTER + true + true + This cluster is an alias of the Mode Select cluster which also defines a namespace for the running modes of the Robotic Vacuum Cleaner devices. + + + Description + SupportedModes + CurrentMode + StartUpMode + OnMode + + + + + If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. + + + + + + + This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + + + + + + + This command is sent by the device on receipt of the ChangeToModeWithStatus command. + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/scene.xml b/src/app/zap-templates/zcl/data-model/chip/scene.xml index cdc3a3d29f3374..02a9c65d68ec0f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/scene.xml +++ b/src/app/zap-templates/zcl/data-model/chip/scene.xml @@ -41,7 +41,7 @@ limitations under the License. SCENES_CLUSTER true true - + SceneCount CurrentScene diff --git a/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml index bc0a44e2de551c..e6c8cabb1b3979 100644 --- a/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml @@ -17,12 +17,6 @@ limitations under the License. - - - - - - Temperature Control Appliances @@ -31,16 +25,16 @@ limitations under the License. TEMPERATURE_CONTROL_CLUSTER true true - TemperatureSetpoint - MinTemperature - MaxTemperature - Step - CurrentTemperatureLevelIndex - SupportedTemperatureLevels + TemperatureSetpoint + MinTemperature + MaxTemperature + Step + SelectedTemperatureLevel + SupportedTemperatureLevels Set Temperature - + @@ -48,5 +42,6 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml new file mode 100644 index 00000000000000..16ca9a02487e3b --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + Appliances + Washer Controls + 0x0053 + WASHER_CONTROLS_CLUSTER + true + true + This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. + + + + SpinSpeeds + SpinSpeedCurrent + NumberOfRinses + MaxRinses + + diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 24a435d846fade..24be37cd01d7d1 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -35,6 +35,7 @@ "content-launch-cluster.xml", "descriptor-cluster.xml", "diagnostic-logs-cluster.xml", + "dishwasher-mode-select-cluster.xml", "door-lock-cluster.xml", "electrical-measurement-cluster.xml", "ethernet-network-diagnostics-cluster.xml", @@ -52,6 +53,7 @@ "illuminance-measurement-cluster.xml", "input-output-value-clusters.xml", "keypad-input-cluster.xml", + "laundry-washer-mode-select-cluster.xml", "level-control-cluster.xml", "localization-configuration-cluster.xml", "low-power-cluster.xml", @@ -73,8 +75,12 @@ "proxy-valid-cluster.xml", "pump-configuration-and-control-cluster.xml", "pwm-cluster.xml", + "refrigerator-and-temperature-controlled-cabinet-mode-select-cluster.xml", "refrigerator-alarm.xml", "relative-humidity-measurement-cluster.xml", + "replacable-monitoring-cluster.xml", + "rvc-clean-mode-select-cluster.xml ", + "rvc-run-mode-select-cluster.xml", "resource-monitoring-cluster.xml", "scene.xml", "smoke-co-alarm-cluster.xml", @@ -92,6 +98,7 @@ "user-label-cluster.xml", "unit-localization-cluster.xml", "wake-on-lan-cluster.xml", + "washer-controls-cluster.xml", "wifi-network-diagnostics-cluster.xml", "window-covering.xml", "matter-devices.xml", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index dfe2ebd70e9471..220ce3a3c9574f 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -34,6 +34,7 @@ "content-launch-cluster.xml", "descriptor-cluster.xml", "diagnostic-logs-cluster.xml", + "dishwasher-mode-select-cluster.xml", "door-lock-cluster.xml", "electrical-measurement-cluster.xml", "ethernet-network-diagnostics-cluster.xml", @@ -51,6 +52,7 @@ "illuminance-measurement-cluster.xml", "input-output-value-clusters.xml", "keypad-input-cluster.xml", + "laundry-washer-mode-select-cluster.xml", "level-control-cluster.xml", "localization-configuration-cluster.xml", "low-power-cluster.xml", @@ -71,8 +73,12 @@ "proxy-valid-cluster.xml", "pump-configuration-and-control-cluster.xml", "pwm-cluster.xml", + "refrigerator-and-temperature-controlled-cabinet-mode-select-cluster.xml", "refrigerator-alarm.xml", "relative-humidity-measurement-cluster.xml", + "rvc-clean-mode-select-cluster.xml ", + "rvc-run-mode-select-cluster.xml", + "replacable-monitoring-cluster.xml", "resource-monitoring-cluster.xml", "scene.xml", "smoke-co-alarm-cluster.xml", @@ -90,6 +96,7 @@ "user-label-cluster.xml", "unit-localization-cluster.xml", "wake-on-lan-cluster.xml", + "washer-controls-cluster.xml", "wifi-network-diagnostics-cluster.xml", "window-covering.xml", "matter-devices.xml", diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index c203887fbc1194..ae3c9ff51732e2 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -36,6 +36,7 @@ "DESCRIPTOR_CLUSTER": [], "DEVICE_TEMP_CLUSTER": [], "DIAGNOSTIC_LOGS_CLUSTER": [], + "DISHWASHER_MODE_SELECT_CLUSTER": [], "DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [], "DOOR_LOCK_CLUSTER": [], "ELECTRICAL_MEASUREMENT_CLUSTER": [], @@ -66,6 +67,7 @@ "INK_CARTRIDGE_MONITORING_CLUSTER": [], "IONIZING_FILTER_MONITORING_CLUSTER": [], "KEYPAD_INPUT_CLUSTER": [], + "LAUNDRY_WASHER_MODE_SELECT_CLUSTER": [], "LEAD_CONCENTRATION_MEASUREMENT_CLUSTER": [], "LEVEL_CONTROL_CLUSTER": [], "LOCALIZATION_CONFIGURATION_CLUSTER": [], @@ -104,9 +106,12 @@ "pump-configuration-and-control-client" ], "PWM_CLUSTER": [], + "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER": [], "RADON_CONCENTRATION_MEASUREMENT_CLUSTER": [], "REFRIGERATOR_ALARM": [], "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER": [], + "RVC_CLEAN_MODE_SELECT_CLUSTER": [], + "RVC_RUN_MODE_SELECT_CLUSTER": [], "SCENES_CLUSTER": [], "SMOKE_CO_ALARM_CLUSTER": [], "SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER": [], @@ -134,6 +139,7 @@ "UV_FILTER_MONITORING_CLUSTER": [], "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [], "WAKE_ON_LAN_CLUSTER": [], + "WASHER_CONTROLS_CLUSTER": [], "WATER_TANK_MONITORING_CLUSTER": [], "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [], "WINDOW_COVERING_CLUSTER": [], @@ -180,6 +186,7 @@ "DESCRIPTOR_CLUSTER": ["descriptor"], "DEVICE_TEMP_CLUSTER": [], "DIAGNOSTIC_LOGS_CLUSTER": ["diagnostic-logs-server"], + "DISHWASHER_MODE_SELECT_CLUSTER": ["mode-select-server"], "DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [], "DOOR_LOCK_CLUSTER": ["door-lock-server"], "ELECTRICAL_MEASUREMENT_CLUSTER": [], @@ -212,6 +219,7 @@ "INK_CARTRIDGE_MONITORING_CLUSTER": [], "IONIZING_FILTER_MONITORING_CLUSTER": [], "KEYPAD_INPUT_CLUSTER": ["keypad-input-server"], + "LAUNDRY_WASHER_MODE_SELECT_CLUSTER": ["mode-select-server"], "LEAD_CONCENTRATION_MEASUREMENT_CLUSTER": [], "LEVEL_CONTROL_CLUSTER": ["level-control"], "LOCALIZATION_CONFIGURATION_CLUSTER": [ @@ -255,9 +263,15 @@ "PWM_CLUSTER": [], "RADON_CONCENTRATION_MEASUREMENT_CLUSTER": [], "REFRIGERATOR_ALARM_CLUSTER": ["refrigerator-alarm-server"], + "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER": [ + "mode-select-server" + ], + "REFRIGERATOR_ALARM_CLUSTER": ["refrigerator-alarm-server"], "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER": [], + "RVC_CLEAN_MODE_SELECT_CLUSTER": ["mode-select-server"], + "RVC_RUN_MODE_SELECT_CLUSTER": ["mode-select-server"], "SCENES_CLUSTER": ["scenes-server"], - "SMOKE_CO_ALARM_CLUSTER": [], + "SMOKE_CO_ALARM_CLUSTER": ["smoke-co-alarm-server"], "SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER": [], "SOFTWARE_DIAGNOSTICS_CLUSTER": ["software-diagnostics-server"], "SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER": [], diff --git a/src/controller/data_model/BUILD.gn b/src/controller/data_model/BUILD.gn index 130b2fb88c195a..88eee715a7f08f 100644 --- a/src/controller/data_model/BUILD.gn +++ b/src/controller/data_model/BUILD.gn @@ -74,20 +74,44 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/BooleanStateClient-ReadImpl.cpp", "jni/BridgedDeviceBasicInformationClient-InvokeSubscribeImpl.cpp", "jni/BridgedDeviceBasicInformationClient-ReadImpl.cpp", + "jni/BromateConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/BromateConcentrationMeasurementClient-ReadImpl.cpp", + "jni/BromodichloromethaneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/BromodichloromethaneConcentrationMeasurementClient-ReadImpl.cpp", + "jni/BromoformConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/BromoformConcentrationMeasurementClient-ReadImpl.cpp", + "jni/CHIPCallbackTypes.h", + "jni/CHIPReadCallbacks.h", + "jni/CarbonDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/CarbonDioxideConcentrationMeasurementClient-ReadImpl.cpp", + "jni/CarbonMonoxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/CarbonMonoxideConcentrationMeasurementClient-ReadImpl.cpp", "jni/CeramicFilterMonitoringClient-InvokeSubscribeImpl.cpp", "jni/CeramicFilterMonitoringClient-ReadImpl.cpp", "jni/ChannelClient-InvokeSubscribeImpl.cpp", "jni/ChannelClient-ReadImpl.cpp", - "jni/CHIPCallbackTypes.h", - "jni/CHIPReadCallbacks.h", + "jni/ChloraminesConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/ChloraminesConcentrationMeasurementClient-ReadImpl.cpp", + "jni/ChlorineConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/ChlorineConcentrationMeasurementClient-ReadImpl.cpp", + "jni/ChlorodibromomethaneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/ChlorodibromomethaneConcentrationMeasurementClient-ReadImpl.cpp", + "jni/ChloroformConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/ChloroformConcentrationMeasurementClient-ReadImpl.cpp", "jni/ColorControlClient-InvokeSubscribeImpl.cpp", "jni/ColorControlClient-ReadImpl.cpp", "jni/ContentLauncherClient-InvokeSubscribeImpl.cpp", "jni/ContentLauncherClient-ReadImpl.cpp", + "jni/CopperConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/CopperConcentrationMeasurementClient-ReadImpl.cpp", "jni/DescriptorClient-InvokeSubscribeImpl.cpp", "jni/DescriptorClient-ReadImpl.cpp", "jni/DiagnosticLogsClient-InvokeSubscribeImpl.cpp", "jni/DiagnosticLogsClient-ReadImpl.cpp", + "jni/DishwasherModeSelectClient-InvokeSubscribeImpl.cpp", + "jni/DishwasherModeSelectClient-ReadImpl.cpp", + "jni/DissolvedOxygenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/DissolvedOxygenConcentrationMeasurementClient-ReadImpl.cpp", "jni/DoorLockClient-InvokeSubscribeImpl.cpp", "jni/DoorLockClient-ReadImpl.cpp", "jni/ElectricalMeasurementClient-InvokeSubscribeImpl.cpp", @@ -96,14 +120,24 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/ElectrostaticFilterMonitoringClient-ReadImpl.cpp", "jni/EthernetNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp", "jni/EthernetNetworkDiagnosticsClient-ReadImpl.cpp", + "jni/EthyleneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/EthyleneConcentrationMeasurementClient-ReadImpl.cpp", + "jni/EthyleneOxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/EthyleneOxideConcentrationMeasurementClient-ReadImpl.cpp", "jni/FanControlClient-InvokeSubscribeImpl.cpp", "jni/FanControlClient-ReadImpl.cpp", "jni/FaultInjectionClient-InvokeSubscribeImpl.cpp", "jni/FaultInjectionClient-ReadImpl.cpp", + "jni/FecalColiformEColiConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/FecalColiformEColiConcentrationMeasurementClient-ReadImpl.cpp", "jni/FixedLabelClient-InvokeSubscribeImpl.cpp", "jni/FixedLabelClient-ReadImpl.cpp", "jni/FlowMeasurementClient-InvokeSubscribeImpl.cpp", "jni/FlowMeasurementClient-ReadImpl.cpp", + "jni/FluorideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/FluorideConcentrationMeasurementClient-ReadImpl.cpp", + "jni/FormaldehydeConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/FormaldehydeConcentrationMeasurementClient-ReadImpl.cpp", "jni/FuelTankMonitoringClient-InvokeSubscribeImpl.cpp", "jni/FuelTankMonitoringClient-ReadImpl.cpp", "jni/GeneralCommissioningClient-InvokeSubscribeImpl.cpp", @@ -114,8 +148,14 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/GroupKeyManagementClient-ReadImpl.cpp", "jni/GroupsClient-InvokeSubscribeImpl.cpp", "jni/GroupsClient-ReadImpl.cpp", + "jni/HaloaceticAcidsConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/HaloaceticAcidsConcentrationMeasurementClient-ReadImpl.cpp", "jni/HepaFilterMonitoringClient-InvokeSubscribeImpl.cpp", "jni/HepaFilterMonitoringClient-ReadImpl.cpp", + "jni/HydrogenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/HydrogenConcentrationMeasurementClient-ReadImpl.cpp", + "jni/HydrogenSulfideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/HydrogenSulfideConcentrationMeasurementClient-ReadImpl.cpp", "jni/IcdManagementClient-InvokeSubscribeImpl.cpp", "jni/IcdManagementClient-ReadImpl.cpp", "jni/IdentifyClient-InvokeSubscribeImpl.cpp", @@ -128,12 +168,18 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/IonizingFilterMonitoringClient-ReadImpl.cpp", "jni/KeypadInputClient-InvokeSubscribeImpl.cpp", "jni/KeypadInputClient-ReadImpl.cpp", + "jni/LaundryWasherModeSelectClient-InvokeSubscribeImpl.cpp", + "jni/LaundryWasherModeSelectClient-ReadImpl.cpp", + "jni/LeadConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/LeadConcentrationMeasurementClient-ReadImpl.cpp", "jni/LevelControlClient-InvokeSubscribeImpl.cpp", "jni/LevelControlClient-ReadImpl.cpp", "jni/LocalizationConfigurationClient-InvokeSubscribeImpl.cpp", "jni/LocalizationConfigurationClient-ReadImpl.cpp", - "jni/LowPowerClient-ReadImpl.cpp", "jni/LowPowerClient-InvokeSubscribeImpl.cpp", + "jni/LowPowerClient-ReadImpl.cpp", + "jni/ManganeseConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/ManganeseConcentrationMeasurementClient-ReadImpl.cpp", "jni/MediaInputClient-InvokeSubscribeImpl.cpp", "jni/MediaInputClient-ReadImpl.cpp", "jni/MediaPlaybackClient-InvokeSubscribeImpl.cpp", @@ -142,6 +188,10 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/ModeSelectClient-ReadImpl.cpp", "jni/NetworkCommissioningClient-InvokeSubscribeImpl.cpp", "jni/NetworkCommissioningClient-ReadImpl.cpp", + "jni/NitricOxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/NitricOxideConcentrationMeasurementClient-ReadImpl.cpp", + "jni/NitrogenDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/NitrogenDioxideConcentrationMeasurementClient-ReadImpl.cpp", "jni/OccupancySensingClient-InvokeSubscribeImpl.cpp", "jni/OccupancySensingClient-ReadImpl.cpp", "jni/OnOffClient-InvokeSubscribeImpl.cpp", @@ -150,14 +200,24 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/OnOffSwitchConfigurationClient-ReadImpl.cpp", "jni/OperationalCredentialsClient-InvokeSubscribeImpl.cpp", "jni/OperationalCredentialsClient-ReadImpl.cpp", + "jni/OperationalStateClient-InvokeSubscribeImpl.cpp", + "jni/OperationalStateClient-ReadImpl.cpp", "jni/OtaSoftwareUpdateProviderClient-InvokeSubscribeImpl.cpp", "jni/OtaSoftwareUpdateProviderClient-ReadImpl.cpp", "jni/OtaSoftwareUpdateRequestorClient-InvokeSubscribeImpl.cpp", "jni/OtaSoftwareUpdateRequestorClient-ReadImpl.cpp", + "jni/OxygenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/OxygenConcentrationMeasurementClient-ReadImpl.cpp", + "jni/OzoneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/OzoneConcentrationMeasurementClient-ReadImpl.cpp", "jni/OzoneFilterMonitoringClient-InvokeSubscribeImpl.cpp", "jni/OzoneFilterMonitoringClient-ReadImpl.cpp", - "jni/OperationalStateClient-InvokeSubscribeImpl.cpp", - "jni/OperationalStateClient-ReadImpl.cpp", + "jni/Pm10ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/Pm10ConcentrationMeasurementClient-ReadImpl.cpp", + "jni/Pm1ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/Pm1ConcentrationMeasurementClient-ReadImpl.cpp", + "jni/Pm25ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/Pm25ConcentrationMeasurementClient-ReadImpl.cpp", "jni/PowerSourceClient-InvokeSubscribeImpl.cpp", "jni/PowerSourceClient-ReadImpl.cpp", "jni/PowerSourceConfigurationClient-InvokeSubscribeImpl.cpp", @@ -174,16 +234,30 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/PulseWidthModulationClient-ReadImpl.cpp", "jni/PumpConfigurationAndControlClient-InvokeSubscribeImpl.cpp", "jni/PumpConfigurationAndControlClient-ReadImpl.cpp", + "jni/RadonConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/RadonConcentrationMeasurementClient-ReadImpl.cpp", "jni/RefrigeratorAlarmClient-InvokeSubscribeImpl.cpp", "jni/RefrigeratorAlarmClient-ReadImpl.cpp", + "jni/RefrigeratorAndTemperatureControlledCabinetModeSelectClient-InvokeSubscribeImpl.cpp", + "jni/RefrigeratorAndTemperatureControlledCabinetModeSelectClient-ReadImpl.cpp", "jni/RelativeHumidityMeasurementClient-InvokeSubscribeImpl.cpp", "jni/RelativeHumidityMeasurementClient-ReadImpl.cpp", + "jni/RvcCleanModeSelectClient-InvokeSubscribeImpl.cpp", + "jni/RvcCleanModeSelectClient-ReadImpl.cpp", + "jni/RvcRunModeSelectClient-InvokeSubscribeImpl.cpp", + "jni/RvcRunModeSelectClient-ReadImpl.cpp", "jni/ScenesClient-InvokeSubscribeImpl.cpp", "jni/ScenesClient-ReadImpl.cpp", - "jni/SmokeCoAlarmClient-ReadImpl.cpp", "jni/SmokeCoAlarmClient-InvokeSubscribeImpl.cpp", + "jni/SmokeCoAlarmClient-ReadImpl.cpp", + "jni/SodiumConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/SodiumConcentrationMeasurementClient-ReadImpl.cpp", "jni/SoftwareDiagnosticsClient-InvokeSubscribeImpl.cpp", "jni/SoftwareDiagnosticsClient-ReadImpl.cpp", + "jni/SulfateConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/SulfateConcentrationMeasurementClient-ReadImpl.cpp", + "jni/SulfurDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/SulfurDioxideConcentrationMeasurementClient-ReadImpl.cpp", "jni/SwitchClient-InvokeSubscribeImpl.cpp", "jni/SwitchClient-ReadImpl.cpp", "jni/TargetNavigatorClient-InvokeSubscribeImpl.cpp", @@ -204,6 +278,14 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/TimeSynchronizationClient-ReadImpl.cpp", "jni/TonerCartridgeMonitoringClient-InvokeSubscribeImpl.cpp", "jni/TonerCartridgeMonitoringClient-ReadImpl.cpp", + "jni/TotalColiformBacteriaConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/TotalColiformBacteriaConcentrationMeasurementClient-ReadImpl.cpp", + "jni/TotalTrihalomethanesConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/TotalTrihalomethanesConcentrationMeasurementClient-ReadImpl.cpp", + "jni/TotalVolatileOrganicCompoundsConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/TotalVolatileOrganicCompoundsConcentrationMeasurementClient-ReadImpl.cpp", + "jni/TurbidityConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", + "jni/TurbidityConcentrationMeasurementClient-ReadImpl.cpp", "jni/UnitLocalizationClient-InvokeSubscribeImpl.cpp", "jni/UnitLocalizationClient-ReadImpl.cpp", "jni/UnitTestingClient-InvokeSubscribeImpl.cpp", @@ -214,91 +296,16 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/UvFilterMonitoringClient-ReadImpl.cpp", "jni/WakeOnLanClient-InvokeSubscribeImpl.cpp", "jni/WakeOnLanClient-ReadImpl.cpp", + "jni/WasherControlsClient-InvokeSubscribeImpl.cpp", + "jni/WasherControlsClient-ReadImpl.cpp", "jni/WaterTankMonitoringClient-InvokeSubscribeImpl.cpp", "jni/WaterTankMonitoringClient-ReadImpl.cpp", "jni/WiFiNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp", "jni/WiFiNetworkDiagnosticsClient-ReadImpl.cpp", "jni/WindowCoveringClient-InvokeSubscribeImpl.cpp", "jni/WindowCoveringClient-ReadImpl.cpp", - "jni/ZeoliteFilterMonitoringClient-ReadImpl.cpp", "jni/ZeoliteFilterMonitoringClient-InvokeSubscribeImpl.cpp", - "jni/BromateConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/BromateConcentrationMeasurementClient-ReadImpl.cpp", - "jni/BromodichloromethaneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/BromodichloromethaneConcentrationMeasurementClient-ReadImpl.cpp", - "jni/BromoformConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/BromoformConcentrationMeasurementClient-ReadImpl.cpp", - "jni/CarbonDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/CarbonDioxideConcentrationMeasurementClient-ReadImpl.cpp", - "jni/CarbonMonoxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/CarbonMonoxideConcentrationMeasurementClient-ReadImpl.cpp", - "jni/ChloraminesConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/ChloraminesConcentrationMeasurementClient-ReadImpl.cpp", - "jni/ChlorineConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/ChlorineConcentrationMeasurementClient-ReadImpl.cpp", - "jni/ChlorodibromomethaneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/ChlorodibromomethaneConcentrationMeasurementClient-ReadImpl.cpp", - "jni/ChloroformConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/ChloroformConcentrationMeasurementClient-ReadImpl.cpp", - "jni/CopperConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/CopperConcentrationMeasurementClient-ReadImpl.cpp", - "jni/DissolvedOxygenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/DissolvedOxygenConcentrationMeasurementClient-ReadImpl.cpp", - "jni/EthyleneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/EthyleneConcentrationMeasurementClient-ReadImpl.cpp", - "jni/EthyleneOxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/EthyleneOxideConcentrationMeasurementClient-ReadImpl.cpp", - "jni/FecalColiformEColiConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/FecalColiformEColiConcentrationMeasurementClient-ReadImpl.cpp", - "jni/FluorideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/FluorideConcentrationMeasurementClient-ReadImpl.cpp", - "jni/FormaldehydeConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/FormaldehydeConcentrationMeasurementClient-ReadImpl.cpp", - "jni/HaloaceticAcidsConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/HaloaceticAcidsConcentrationMeasurementClient-ReadImpl.cpp", - "jni/HydrogenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/HydrogenConcentrationMeasurementClient-ReadImpl.cpp", - "jni/HydrogenSulfideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/HydrogenSulfideConcentrationMeasurementClient-ReadImpl.cpp", - "jni/LeadConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/LeadConcentrationMeasurementClient-ReadImpl.cpp", - "jni/ManganeseConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/ManganeseConcentrationMeasurementClient-ReadImpl.cpp", - "jni/NitricOxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/NitricOxideConcentrationMeasurementClient-ReadImpl.cpp", - "jni/NitrogenDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/NitrogenDioxideConcentrationMeasurementClient-ReadImpl.cpp", - "jni/OxygenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/OxygenConcentrationMeasurementClient-ReadImpl.cpp", - "jni/OzoneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/OzoneConcentrationMeasurementClient-ReadImpl.cpp", - "jni/RadonConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/RadonConcentrationMeasurementClient-ReadImpl.cpp", - "jni/SodiumConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/SodiumConcentrationMeasurementClient-ReadImpl.cpp", - "jni/SulfateConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/SulfateConcentrationMeasurementClient-ReadImpl.cpp", - "jni/SulfurDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/SulfurDioxideConcentrationMeasurementClient-ReadImpl.cpp", - "jni/TotalColiformBacteriaConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/TotalColiformBacteriaConcentrationMeasurementClient-ReadImpl.cpp", - "jni/TotalTrihalomethanesConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/TotalTrihalomethanesConcentrationMeasurementClient-ReadImpl.cpp", - "jni/TotalVolatileOrganicCompoundsConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/TotalVolatileOrganicCompoundsConcentrationMeasurementClient-ReadImpl.cpp", - "jni/TurbidityConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/TurbidityConcentrationMeasurementClient-ReadImpl.cpp", - "jni/Pm1ConcentrationMeasurementClient-ReadImpl.cpp", - "jni/Pm1ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/Pm10ConcentrationMeasurementClient-ReadImpl.cpp", - "jni/Pm10ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - "jni/Pm25ConcentrationMeasurementClient-ReadImpl.cpp", - "jni/Pm25ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", - - # Disable CM cluster table tests until update is done - # https://github.com/project-chip/connectedhomeip/issues/24425 - #"jni/ClientMonitoringClient-ReadImpl.cpp", - #"jni/ClientMonitoringClient-InvokeSubscribeImpl.cpp", + "jni/ZeoliteFilterMonitoringClient-ReadImpl.cpp", ] deps = [ diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 122e8dff8a6234..8515fe3b3d9d41 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1,6 +1,18 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; @@ -2596,10 +2608,6 @@ client cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - response struct KeySetReadAllIndicesResponse = 5 { INT16U groupKeySetIDs[] = 0; } @@ -2611,7 +2619,7 @@ client cluster GroupKeyManagement = 63 { /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; /** Return the list of Group Key Sets associated with the accessing fabric */ - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only @@ -2744,23 +2752,252 @@ client cluster IcdManagement = 70 { /** Attributes and commands for selecting a mode from a list of supported options. */ client cluster ModeSelect = 80 { + enum ModeTag : ENUM16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + } + + enum StatusCode : ENUM8 { + kSuccess = 0; + kUnsupportedMode = 1; + kGenericFailure = 2; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + kExtendedStatus = 0x2; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute char_string<64> description = 0; + readonly attribute optional nullable enum16 standardNamespace = 1; + readonly attribute ModeOptionStruct supportedModes[] = 2; + readonly attribute int8u currentMode = 3; + attribute optional nullable int8u startUpMode = 4; + attribute optional nullable int8u onMode = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + request struct ChangeToModeWithStatusRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 2 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + /** If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. */ + command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; + /** This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToModeWithStatus(ChangeToModeWithStatusRequest): ChangeToModeResponse = 1; +} + +/** This cluster is an alias of the Mode Select cluster, defining additional semantics and + namespaced enumerated values for laundry washer devices. */ +client cluster LaundryWasherModeSelect = 81 { + enum ModeTag : ENUM16 { + kNormal = 16384; + kDelicate = 16385; + kHeavy = 16386; + kWhites = 16387; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + kExtendedStatus = 0x2; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute char_string<64> description = 0; + readonly attribute ModeOptionStruct supportedModes[] = 2; + readonly attribute int8u currentMode = 3; + attribute optional nullable int8u startUpMode = 4; + attribute optional nullable int8u onMode = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + request struct ChangeToModeWithStatusRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 2 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + /** If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. */ + command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; + /** This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToModeWithStatus(ChangeToModeWithStatusRequest): ChangeToModeResponse = 1; +} + +/** This cluster is an alias of the Mode Select cluster, defining additional semantics and + namespaced enumerated values for refrigerator and temperature controlled cabinet devices. */ +client cluster RefrigeratorAndTemperatureControlledCabinetModeSelect = 82 { + enum ModeTag : ENUM16 { + kRapidCool = 16384; + kRapidFreeze = 16385; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + kExtendedStatus = 0x2; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute char_string<64> description = 0; + readonly attribute ModeOptionStruct supportedModes[] = 2; + readonly attribute int8u currentMode = 3; + attribute optional nullable int8u startUpMode = 4; + attribute optional nullable int8u onMode = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + request struct ChangeToModeWithStatusRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 2 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + /** If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. */ + command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; + /** This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToModeWithStatus(ChangeToModeWithStatusRequest): ChangeToModeResponse = 1; +} + +/** This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. */ +client cluster WasherControls = 83 { + bitmap Feature : BITMAP32 { + kSpin = 0x1; + kRinse = 0x2; + } + + readonly attribute optional CHAR_STRING spinSpeeds[] = 0; + attribute optional nullable int8u spinSpeedCurrent = 1; + attribute optional nullable int8u numberOfRinses = 2; + readonly attribute optional int8u maxRinses = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is an alias of the Mode Select cluster which also defines a namespace for the running modes of the Robotic Vacuum Cleaner devices. */ +client cluster RvcRunModeSelect = 84 { + enum ModeTag : ENUM16 { + kIdle = 16384; + kCleaning = 16385; + } + + enum StatusCode : ENUM8 { + kStuck = 65; + kDustBinMissing = 66; + kDustBinFull = 67; + kWaterTankEmpty = 68; + kWaterTankMissing = 69; + kWaterTankLidOpen = 70; + kMopCleaningPadMissing = 71; + kBatteryLow = 72; + } + bitmap Feature : BITMAP32 { - kDeponoff = 0x1; + kOnOff = 0x1; + kExtendedStatus = 0x2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; + struct ModeTagStruct { + optional vendor_id mfgCode = 0; enum16 value = 1; + optional char_string<64> tagName = 2; } struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; - SemanticTagStruct semanticTags[] = 2; + ModeTagStruct modeTags[] = 2; } - readonly attribute char_string<32> description = 0; - readonly attribute nullable enum16 standardNamespace = 1; + readonly attribute char_string<64> description = 0; readonly attribute ModeOptionStruct supportedModes[] = 2; readonly attribute int8u currentMode = 3; attribute optional nullable int8u startUpMode = 4; @@ -2776,8 +3013,86 @@ client cluster ModeSelect = 80 { INT8U newMode = 0; } - /** On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. */ + request struct ChangeToModeWithStatusRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 2 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + /** If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. */ command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; + /** This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToModeWithStatus(ChangeToModeWithStatusRequest): ChangeToModeResponse = 1; +} + +/** This cluster is an alias of the Mode Select cluster which also defines a namespace for the + cleaning type of the Robotic Vacuum Cleaner devices. */ +client cluster RvcCleanModeSelect = 85 { + enum ModeTag : ENUM16 { + kDeepClean = 16384; + kVacuum = 16385; + kMop = 16386; + } + + enum StatusCode : ENUM8 { + kCleaningInProgress = 64; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + kExtendedStatus = 0x2; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute char_string<64> description = 0; + readonly attribute ModeOptionStruct supportedModes[] = 2; + readonly attribute int8u currentMode = 3; + attribute optional nullable int8u startUpMode = 4; + attribute optional nullable int8u onMode = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + request struct ChangeToModeWithStatusRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 2 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + /** If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. */ + command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; + /** This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToModeWithStatus(ChangeToModeWithStatusRequest): ChangeToModeResponse = 1; } /** Attributes and commands for configuring the temperature control, and reporting temperature. */ @@ -2785,19 +3100,15 @@ client cluster TemperatureControl = 86 { bitmap Feature : BITMAP32 { kTemperatureNumber = 0x1; kTemperatureLevel = 0x2; + kTemperatureStep = 0x4; } - struct TemperatureLevelStruct { - char_string<64> label = 0; - int8u temperatureLevel = 1; - } - - readonly attribute optional int16s temperatureSetpoint = 0; - readonly attribute optional int16s minTemperature = 1; - readonly attribute optional int16s maxTemperature = 2; - readonly attribute optional int16s step = 3; - readonly attribute optional int8u currentTemperatureLevelIndex = 4; - readonly attribute optional TemperatureLevelStruct supportedTemperatureLevels[] = 5; + readonly attribute optional temperature temperatureSetpoint = 0; + readonly attribute optional temperature minTemperature = 1; + readonly attribute optional temperature maxTemperature = 2; + readonly attribute optional temperature step = 3; + readonly attribute optional int8u selectedTemperatureLevel = 4; + readonly attribute optional char_string supportedTemperatureLevels[] = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2806,7 +3117,7 @@ client cluster TemperatureControl = 86 { readonly attribute int16u clusterRevision = 65533; request struct SetTemperatureRequest { - optional INT16S targetTemperature = 0; + optional temperature targetTemperature = 0; optional INT8U targetTemperatureLevel = 1; } @@ -2827,8 +3138,7 @@ client cluster RefrigeratorAlarm = 87 { AlarmMap mask = 3; } - attribute AlarmMap mask = 0; - readonly attribute AlarmMap latch = 1; + readonly attribute AlarmMap mask = 0; readonly attribute AlarmMap state = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2836,14 +3146,66 @@ client cluster RefrigeratorAlarm = 87 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; +} - request struct ResetRequest { - AlarmMap alarms = 0; - optional AlarmMap mask = 1; +/** This cluster is an alias of the Mode Select cluster, defining additional semantics and + namespaced enumerated values for dishwasher devices. */ +client cluster DishwasherModeSelect = 89 { + enum ModeTag : ENUM16 { + kNormal = 16384; + kHeavy = 16385; + kLight = 16386; } - /** Reset alarm */ - command Reset(ResetRequest): DefaultSuccess = 0; + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + kExtendedStatus = 0x2; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + optional char_string<64> tagName = 2; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute char_string<64> description = 0; + readonly attribute ModeOptionStruct supportedModes[] = 2; + readonly attribute int8u currentMode = 3; + attribute optional nullable int8u startUpMode = 4; + attribute optional nullable int8u onMode = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + request struct ChangeToModeWithStatusRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 2 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + /** If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an INVALID_COMMAND status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device is unable to transition as requested, the server SHALL respond with a FAILURE status response. + If the NewMode field matches the Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. */ + command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; + /** This command is used to change device modes using the same mechanism and semantics as ChangeToMode, and additionally obtaining a response with an ability for clients to determine causes of failures with fine-grained details. For status response depending on NewMode field, see ChangeToMode command. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToModeWithStatus(ChangeToModeWithStatusRequest): ChangeToModeResponse = 1; } /** Attributes for reporting air quality classification */ diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 196ec3e3f0733c..c393c9e320bc7f 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -544,7 +544,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -796,7 +796,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -10427,7 +10427,1721 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Mode Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ChangeToModeWithStatus", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Mode Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "Description", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StandardNamespace", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum16", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedModes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Laundry Washer Mode Select", + "code": 81, + "mfgCode": null, + "define": "LAUNDRY_WASHER_MODE_SELECT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ChangeToModeWithStatus", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Laundry Washer Mode Select", + "code": 81, + "mfgCode": null, + "define": "LAUNDRY_WASHER_MODE_SELECT_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "Description", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedModes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator And Temperature Controlled Cabinet Mode Select", + "code": 82, + "mfgCode": null, + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ChangeToModeWithStatus", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator And Temperature Controlled Cabinet Mode Select", + "code": 82, + "mfgCode": null, + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "Description", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedModes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Washer Controls", + "code": 83, + "mfgCode": null, + "define": "WASHER_CONTROLS_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Washer Controls", + "code": 83, + "mfgCode": null, + "define": "WASHER_CONTROLS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "SpinSpeeds", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpinSpeedCurrent", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfRinses", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxRinses", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Run Mode Select", + "code": 84, + "mfgCode": null, + "define": "RVC_RUN_MODE_SELECT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ChangeToModeWithStatus", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Run Mode Select", + "code": 84, + "mfgCode": null, + "define": "RVC_RUN_MODE_SELECT_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "Description", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedModes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Clean Mode Select", + "code": 85, + "mfgCode": null, + "define": "RVC_CLEAN_MODE_SELECT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ChangeToModeWithStatus", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Clean Mode Select", + "code": 85, + "mfgCode": null, + "define": "RVC_CLEAN_MODE_SELECT_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "Description", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedModes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator Alarm", + "code": 87, + "mfgCode": null, + "define": "REFRIGERATOR_ALARM", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "Reset", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator Alarm", + "code": 87, + "mfgCode": null, + "define": "REFRIGERATOR_ALARM", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Latch", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10452,10 +12166,10 @@ ] }, { - "name": "Mode Select", - "code": 80, + "name": "Dishwasher Mode Select", + "code": 89, "mfgCode": null, - "define": "MODE_SELECT_CLUSTER", + "define": "DISHWASHER_MODE_SELECT_CLUSTER", "side": "client", "enabled": 1, "commands": [ @@ -10466,6 +12180,14 @@ "source": "client", "incoming": 0, "outgoing": 1 + }, + { + "name": "ChangeToModeWithStatus", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 } ], "attributes": [ @@ -10475,11 +12197,11 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10504,12 +12226,22 @@ ] }, { - "name": "Mode Select", - "code": 80, + "name": "Dishwasher Mode Select", + "code": 89, "mfgCode": null, - "define": "MODE_SELECT_CLUSTER", + "define": "DISHWASHER_MODE_SELECT_CLUSTER", "side": "server", "enabled": 0, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], "attributes": [ { "name": "Description", @@ -10527,22 +12259,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "StandardNamespace", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "enum16", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "SupportedModes", "code": 2, @@ -10553,7 +12269,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10581,7 +12297,7 @@ "mfgCode": null, "side": "server", "type": "int8u", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -10597,222 +12313,16 @@ "mfgCode": null, "side": "server", "type": "int8u", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Refrigerator Alarm", - "code": 87, - "mfgCode": null, - "define": "REFRIGERATOR_ALARM", - "side": "client", - "enabled": 1, - "commands": [ - { - "name": "Reset", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Refrigerator Alarm", - "code": 87, - "mfgCode": null, - "define": "REFRIGERATOR_ALARM", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Mask", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "AlarmMap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Latch", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "AlarmMap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "State", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "AlarmMap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "GeneratedCommandList", "code": 65528, @@ -37182,5 +38692,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/src/controller/java/OnboardingPayloadParser-JNI.cpp b/src/controller/java/OnboardingPayloadParser-JNI.cpp index cea62189fd0850..1c484eca5142a5 100644 --- a/src/controller/java/OnboardingPayloadParser-JNI.cpp +++ b/src/controller/java/OnboardingPayloadParser-JNI.cpp @@ -22,13 +22,15 @@ using namespace chip; #define SETUP_PAYLOAD_PARSER_JNI_ERROR_METHOD_NOT_FOUND _SETUP_PAYLOAD_PARSER_JNI_ERROR(2) #define SETUP_PAYLOAD_PARSER_JNI_ERROR_FIELD_NOT_FOUND _SETUP_PAYLOAD_PARSER_JNI_ERROR(3) -#define JNI_METHOD(RETURN, METHOD_NAME) extern "C" JNIEXPORT RETURN JNICALL Java_chip_setuppayload_SetupPayloadParser_##METHOD_NAME +#define JNI_METHOD(RETURN, METHOD_NAME) \ + extern "C" JNIEXPORT RETURN JNICALL Java_chip_onboardingpayload_OnboardingPayloadParser_##METHOD_NAME static jobject TransformSetupPayload(JNIEnv * env, SetupPayload & payload); static jobject CreateCapabilitiesHashSet(JNIEnv * env, RendezvousInformationFlags flags); static void TransformSetupPayloadFromJobject(JNIEnv * env, jobject jPayload, SetupPayload & payload); static void CreateCapabilitiesFromHashSet(JNIEnv * env, jobject discoveryCapabilitiesObj, RendezvousInformationFlags & flags); static CHIP_ERROR ThrowUnrecognizedQRCodeException(JNIEnv * env, jstring qrCodeObj); +static CHIP_ERROR ThrowOnboardingPayloadException(JNIEnv * env, CHIP_ERROR errToThrow); jint JNI_OnLoad(JavaVM * jvm, void * reserved) { @@ -50,8 +52,11 @@ JNI_METHOD(jobject, fetchPayloadFromQrCode)(JNIEnv * env, jobject self, jstring if (skipPayloadValidation == JNI_FALSE && !payload.isValidQRCodePayload()) { - jclass exceptionCls = env->FindClass("chip/setuppayload/SetupPayloadParser$SetupPayloadException"); - JniReferences::GetInstance().ThrowError(env, exceptionCls, CHIP_ERROR_INVALID_ARGUMENT); + ThrowOnboardingPayloadException(env, err); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SetupPayload, "Error throwing OnboardingPayloadException: %" CHIP_ERROR_FORMAT, err.Format()); + } return nullptr; } @@ -70,7 +75,7 @@ JNI_METHOD(jobject, fetchPayloadFromQrCode)(JNIEnv * env, jobject self, jstring jobject TransformSetupPayload(JNIEnv * env, SetupPayload & payload) { - jclass setupPayloadClass = env->FindClass("chip/setuppayload/SetupPayload"); + jclass setupPayloadClass = env->FindClass("chip/onboardingpayload/OnboardingPayload"); jmethodID setupConstr = env->GetMethodID(setupPayloadClass, "", "()V"); jobject setupPayload = env->NewObject(setupPayloadClass, setupConstr); @@ -106,50 +111,51 @@ jobject TransformSetupPayload(JNIEnv * env, SetupPayload & payload) CreateCapabilitiesHashSet(env, payload.rendezvousInformation.ValueOr(RendezvousInformationFlag::kNone))); jmethodID addOptionalInfoMid = - env->GetMethodID(setupPayloadClass, "addOptionalQRCodeInfo", "(Lchip/setuppayload/OptionalQRCodeInfo;)V"); + env->GetMethodID(setupPayloadClass, "addOptionalQRCodeInfo", "(Lchip/onboardingpayload/OptionalQRCodeInfo;)V"); std::vector optional_info = payload.getAllOptionalVendorData(); for (OptionalQRCodeInfo & info : optional_info) { - jclass optionalInfoClass = env->FindClass("chip/setuppayload/OptionalQRCodeInfo"); + jclass optionalInfoClass = env->FindClass("chip/onboardingpayload/OptionalQRCodeInfo"); jobject optionalInfo = env->AllocObject(optionalInfoClass); jfieldID tag = env->GetFieldID(optionalInfoClass, "tag", "I"); - jfieldID type = env->GetFieldID(optionalInfoClass, "type", "Lchip/setuppayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); - jfieldID data = env->GetFieldID(optionalInfoClass, "data", "Ljava/lang/String;"); + jfieldID type = + env->GetFieldID(optionalInfoClass, "type", "Lchip/onboardingpayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); + jfieldID data = env->GetFieldID(optionalInfoClass, "data", "Ljava/lang/String;"); jfieldID int32 = env->GetFieldID(optionalInfoClass, "int32", "I"); env->SetIntField(optionalInfo, tag, info.tag); - jclass enumClass = env->FindClass("chip/setuppayload/OptionalQRCodeInfo$OptionalQRCodeInfoType"); + jclass enumClass = env->FindClass("chip/onboardingpayload/OptionalQRCodeInfo$OptionalQRCodeInfoType"); jfieldID enumType = nullptr; switch (info.type) { case optionalQRCodeInfoTypeString: - enumType = - env->GetStaticFieldID(enumClass, "TYPE_STRING", "Lchip/setuppayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); + enumType = env->GetStaticFieldID(enumClass, "TYPE_STRING", + "Lchip/onboardingpayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); break; case optionalQRCodeInfoTypeInt32: - enumType = - env->GetStaticFieldID(enumClass, "TYPE_INT32", "Lchip/setuppayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); + enumType = env->GetStaticFieldID(enumClass, "TYPE_INT32", + "Lchip/onboardingpayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); break; case optionalQRCodeInfoTypeInt64: - enumType = - env->GetStaticFieldID(enumClass, "TYPE_INT64", "Lchip/setuppayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); + enumType = env->GetStaticFieldID(enumClass, "TYPE_INT64", + "Lchip/onboardingpayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); break; case optionalQRCodeInfoTypeUInt32: - enumType = - env->GetStaticFieldID(enumClass, "TYPE_UINT32", "Lchip/setuppayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); + enumType = env->GetStaticFieldID(enumClass, "TYPE_UINT32", + "Lchip/onboardingpayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); break; case optionalQRCodeInfoTypeUInt64: - enumType = - env->GetStaticFieldID(enumClass, "TYPE_UINT64", "Lchip/setuppayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); + enumType = env->GetStaticFieldID(enumClass, "TYPE_UINT64", + "Lchip/onboardingpayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); break; case optionalQRCodeInfoTypeUnknown: default: // Optional Type variable has to set any value. - enumType = - env->GetStaticFieldID(enumClass, "TYPE_UNKNOWN", "Lchip/setuppayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); + enumType = env->GetStaticFieldID(enumClass, "TYPE_UNKNOWN", + "Lchip/onboardingpayload/OptionalQRCodeInfo$OptionalQRCodeInfoType;"); break; } @@ -175,24 +181,25 @@ jobject CreateCapabilitiesHashSet(JNIEnv * env, RendezvousInformationFlags flags jobject capabilitiesHashSet = env->NewObject(hashSetClass, hashSetConstructor); jmethodID hashSetAddMethod = env->GetMethodID(hashSetClass, "add", "(Ljava/lang/Object;)Z"); - jclass capabilityEnum = env->FindClass("chip/setuppayload/DiscoveryCapability"); + jclass capabilityEnum = env->FindClass("chip/onboardingpayload/DiscoveryCapability"); if (flags.Has(chip::RendezvousInformationFlag::kBLE)) { - jfieldID bleCapability = env->GetStaticFieldID(capabilityEnum, "BLE", "Lchip/setuppayload/DiscoveryCapability;"); + jfieldID bleCapability = env->GetStaticFieldID(capabilityEnum, "BLE", "Lchip/onboardingpayload/DiscoveryCapability;"); jobject enumObj = env->GetStaticObjectField(capabilityEnum, bleCapability); env->CallBooleanMethod(capabilitiesHashSet, hashSetAddMethod, enumObj); } if (flags.Has(chip::RendezvousInformationFlag::kSoftAP)) { - jfieldID softApCapability = env->GetStaticFieldID(capabilityEnum, "SOFT_AP", "Lchip/setuppayload/DiscoveryCapability;"); - jobject enumObj = env->GetStaticObjectField(capabilityEnum, softApCapability); + jfieldID softApCapability = + env->GetStaticFieldID(capabilityEnum, "SOFT_AP", "Lchip/onboardingpayload/DiscoveryCapability;"); + jobject enumObj = env->GetStaticObjectField(capabilityEnum, softApCapability); env->CallBooleanMethod(capabilitiesHashSet, hashSetAddMethod, enumObj); } if (flags.Has(chip::RendezvousInformationFlag::kOnNetwork)) { jfieldID onNetworkCapability = - env->GetStaticFieldID(capabilityEnum, "ON_NETWORK", "Lchip/setuppayload/DiscoveryCapability;"); + env->GetStaticFieldID(capabilityEnum, "ON_NETWORK", "Lchip/onboardingpayload/DiscoveryCapability;"); jobject enumObj = env->GetStaticObjectField(capabilityEnum, onNetworkCapability); env->CallBooleanMethod(capabilitiesHashSet, hashSetAddMethod, enumObj); } @@ -210,8 +217,11 @@ JNI_METHOD(jstring, getQrCodeFromPayload)(JNIEnv * env, jobject self, jobject se err = QRCodeSetupPayloadGenerator(payload).payloadBase38Representation(qrString); if (err != CHIP_NO_ERROR) { - jclass exceptionCls = env->FindClass("chip/setuppayload/SetupPayloadParser$SetupPayloadException"); - JniReferences::GetInstance().ThrowError(env, exceptionCls, err); + ThrowOnboardingPayloadException(env, err); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SetupPayload, "Error throwing OnboardingPayloadException: %" CHIP_ERROR_FORMAT, err.Format()); + } return nullptr; } @@ -220,7 +230,7 @@ JNI_METHOD(jstring, getQrCodeFromPayload)(JNIEnv * env, jobject self, jobject se void TransformSetupPayloadFromJobject(JNIEnv * env, jobject jPayload, SetupPayload & payload) { - jclass setupPayloadClass = env->FindClass("chip/setuppayload/SetupPayload"); + jclass setupPayloadClass = env->FindClass("chip/onboardingpayload/OnboardingPayload"); jfieldID version = env->GetFieldID(setupPayloadClass, "version", "I"); jfieldID vendorId = env->GetFieldID(setupPayloadClass, "vendorId", "I"); @@ -257,9 +267,9 @@ void CreateCapabilitiesFromHashSet(JNIEnv * env, jobject discoveryCapabilitiesOb jmethodID hashSetContainsMethod = env->GetMethodID(hashSetClass, "contains", "(Ljava/lang/Object;)Z"); jboolean contains; - jclass capabilityEnum = env->FindClass("chip/setuppayload/DiscoveryCapability"); + jclass capabilityEnum = env->FindClass("chip/onboardingpayload/DiscoveryCapability"); - jfieldID bleCapability = env->GetStaticFieldID(capabilityEnum, "BLE", "Lchip/setuppayload/DiscoveryCapability;"); + jfieldID bleCapability = env->GetStaticFieldID(capabilityEnum, "BLE", "Lchip/onboardingpayload/DiscoveryCapability;"); jobject bleObj = env->GetStaticObjectField(capabilityEnum, bleCapability); contains = env->CallBooleanMethod(discoveryCapabilitiesObj, hashSetContainsMethod, bleObj); if (contains) @@ -267,7 +277,7 @@ void CreateCapabilitiesFromHashSet(JNIEnv * env, jobject discoveryCapabilitiesOb flags.Set(chip::RendezvousInformationFlag::kBLE); } - jfieldID softApCapability = env->GetStaticFieldID(capabilityEnum, "SOFT_AP", "Lchip/setuppayload/DiscoveryCapability;"); + jfieldID softApCapability = env->GetStaticFieldID(capabilityEnum, "SOFT_AP", "Lchip/onboardingpayload/DiscoveryCapability;"); jobject softApObj = env->GetStaticObjectField(capabilityEnum, softApCapability); contains = env->CallBooleanMethod(discoveryCapabilitiesObj, hashSetContainsMethod, softApObj); if (contains) @@ -275,9 +285,10 @@ void CreateCapabilitiesFromHashSet(JNIEnv * env, jobject discoveryCapabilitiesOb flags.Set(chip::RendezvousInformationFlag::kSoftAP); } - jfieldID onNetworkCapability = env->GetStaticFieldID(capabilityEnum, "ON_NETWORK", "Lchip/setuppayload/DiscoveryCapability;"); - jobject onNetworkObj = env->GetStaticObjectField(capabilityEnum, onNetworkCapability); - contains = env->CallBooleanMethod(discoveryCapabilitiesObj, hashSetContainsMethod, onNetworkObj); + jfieldID onNetworkCapability = + env->GetStaticFieldID(capabilityEnum, "ON_NETWORK", "Lchip/onboardingpayload/DiscoveryCapability;"); + jobject onNetworkObj = env->GetStaticObjectField(capabilityEnum, onNetworkCapability); + contains = env->CallBooleanMethod(discoveryCapabilitiesObj, hashSetContainsMethod, onNetworkObj); if (contains) { flags.Set(chip::RendezvousInformationFlag::kOnNetwork); @@ -292,7 +303,7 @@ CHIP_ERROR ThrowUnrecognizedQRCodeException(JNIEnv * env, jstring qrCodeObj) env->ExceptionClear(); - exceptionCls = env->FindClass("chip/setuppayload/SetupPayloadParser$UnrecognizedQrCodeException"); + exceptionCls = env->FindClass("chip/onboardingpayload/UnrecognizedQrCodeException"); VerifyOrReturnError(exceptionCls != NULL, SETUP_PAYLOAD_PARSER_JNI_ERROR_TYPE_NOT_FOUND); exceptionConstructor = env->GetMethodID(exceptionCls, "", "(Ljava/lang/String;)V"); VerifyOrReturnError(exceptionConstructor != NULL, SETUP_PAYLOAD_PARSER_JNI_ERROR_METHOD_NOT_FOUND); @@ -302,3 +313,25 @@ CHIP_ERROR ThrowUnrecognizedQRCodeException(JNIEnv * env, jstring qrCodeObj) env->Throw(exception); return CHIP_NO_ERROR; } + +CHIP_ERROR ThrowOnboardingPayloadException(JNIEnv * env, CHIP_ERROR errToThrow) +{ + jclass exceptionCls = nullptr; + jmethodID exceptionConstructor = nullptr; + jthrowable exception = nullptr; + + env->ExceptionClear(); + + exceptionCls = env->FindClass("chip/onboardingpayload/OnboardingPayloadException"); + VerifyOrReturnError(exceptionCls != NULL, SETUP_PAYLOAD_PARSER_JNI_ERROR_TYPE_NOT_FOUND); + exceptionConstructor = env->GetMethodID(exceptionCls, "", "(Ljava/lang/String;)V"); + VerifyOrReturnError(exceptionConstructor != NULL, SETUP_PAYLOAD_PARSER_JNI_ERROR_METHOD_NOT_FOUND); + + jstring jerrStr = env->NewStringUTF(ErrorStr(errToThrow)); + + exception = (jthrowable) env->NewObject(exceptionCls, exceptionConstructor, jerrStr); + VerifyOrReturnError(exception != NULL, SETUP_PAYLOAD_PARSER_JNI_ERROR_EXCEPTION_THROWN); + + env->Throw(exception); + return CHIP_NO_ERROR; +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index d558f167999302..f95bd3e9867c45 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -154,12 +154,30 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == ModeSelect.ID) { return new ModeSelect(); } + if (clusterId == LaundryWasherModeSelect.ID) { + return new LaundryWasherModeSelect(); + } + if (clusterId == RefrigeratorAndTemperatureControlledCabinetModeSelect.ID) { + return new RefrigeratorAndTemperatureControlledCabinetModeSelect(); + } + if (clusterId == WasherControls.ID) { + return new WasherControls(); + } + if (clusterId == RvcRunModeSelect.ID) { + return new RvcRunModeSelect(); + } + if (clusterId == RvcCleanModeSelect.ID) { + return new RvcCleanModeSelect(); + } if (clusterId == TemperatureControl.ID) { return new TemperatureControl(); } if (clusterId == RefrigeratorAlarm.ID) { return new RefrigeratorAlarm(); } + if (clusterId == DishwasherModeSelect.ID) { + return new DishwasherModeSelect(); + } if (clusterId == AirQuality.ID) { return new AirQuality(); } @@ -5396,23 +5414,6 @@ public static KeySetRemoveCommandField value(int id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum KeySetReadAllIndicesCommandField {GroupKeySetIDs(0),; - private final int id; - KeySetReadAllIndicesCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static KeySetReadAllIndicesCommandField value(int id) throws NoSuchFieldError { - for (KeySetReadAllIndicesCommandField field : KeySetReadAllIndicesCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); @@ -6249,7 +6250,8 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - ChangeToMode(0L),; + ChangeToMode(0L), + ChangeToModeWithStatus(1L),; private final long id; Command(long id) { this.id = id; @@ -6284,6 +6286,23 @@ public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } + }public enum ChangeToModeWithStatusCommandField {NewMode(0),; + private final int id; + ChangeToModeWithStatusCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeToModeWithStatusCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeWithStatusCommandField field : ChangeToModeWithStatusCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); @@ -6314,19 +6333,18 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class TemperatureControl implements BaseCluster { - public static final long ID = 86L; + public static class LaundryWasherModeSelect implements BaseCluster { + public static final long ID = 81L; public long getID() { return ID; } public enum Attribute { - TemperatureSetpoint(0L), - MinTemperature(1L), - MaxTemperature(2L), - Step(3L), - CurrentTemperatureLevelIndex(4L), - SupportedTemperatureLevels(5L), + Description(0L), + SupportedModes(2L), + CurrentMode(3L), + StartUpMode(4L), + OnMode(5L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -6373,7 +6391,8 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - SetTemperature(0L),; + ChangeToMode(0L), + ChangeToModeWithStatus(1L),; private final long id; Command(long id) { this.id = id; @@ -6391,17 +6410,34 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum SetTemperatureCommandField {TargetTemperature(0),TargetTemperatureLevel(1),; + }public enum ChangeToModeCommandField {NewMode(0),; private final int id; - SetTemperatureCommandField(int id) { + ChangeToModeCommandField(int id) { this.id = id; } public int getID() { return id; } - public static SetTemperatureCommandField value(int id) throws NoSuchFieldError { - for (SetTemperatureCommandField field : SetTemperatureCommandField.values()) { + public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeCommandField field : ChangeToModeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ChangeToModeWithStatusCommandField {NewMode(0),; + private final int id; + ChangeToModeWithStatusCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeToModeWithStatusCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeWithStatusCommandField field : ChangeToModeWithStatusCommandField.values()) { if (field.getID() == id) { return field; } @@ -6438,16 +6474,18 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class RefrigeratorAlarm implements BaseCluster { - public static final long ID = 87L; + public static class RefrigeratorAndTemperatureControlledCabinetModeSelect implements BaseCluster { + public static final long ID = 82L; public long getID() { return ID; } public enum Attribute { - Mask(0L), - Latch(1L), - State(2L), + Description(0L), + SupportedModes(2L), + CurrentMode(3L), + StartUpMode(4L), + OnMode(5L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -6473,8 +6511,7 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event { - Notify(0L),; + public enum Event {; private final long id; Event(long id) { this.id = id; @@ -6495,7 +6532,146 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - Reset(0L),; + ChangeToMode(0L), + ChangeToModeWithStatus(1L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum ChangeToModeCommandField {NewMode(0),; + private final int id; + ChangeToModeCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeCommandField field : ChangeToModeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ChangeToModeWithStatusCommandField {NewMode(0),; + private final int id; + ChangeToModeWithStatusCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeToModeWithStatusCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeWithStatusCommandField field : ChangeToModeWithStatusCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class WasherControls implements BaseCluster { + public static final long ID = 83L; + public long getID() { + return ID; + } + + public enum Attribute { + SpinSpeeds(0L), + SpinSpeedCurrent(1L), + NumberOfRinses(2L), + MaxRinses(3L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command {; private final long id; Command(long id) { this.id = id; @@ -6513,17 +6689,650 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum ResetCommandField {Alarms(0),Mask(1),; + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class RvcRunModeSelect implements BaseCluster { + public static final long ID = 84L; + public long getID() { + return ID; + } + + public enum Attribute { + Description(0L), + SupportedModes(2L), + CurrentMode(3L), + StartUpMode(4L), + OnMode(5L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + ChangeToMode(0L), + ChangeToModeWithStatus(1L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum ChangeToModeCommandField {NewMode(0),; + private final int id; + ChangeToModeCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeCommandField field : ChangeToModeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ChangeToModeWithStatusCommandField {NewMode(0),; + private final int id; + ChangeToModeWithStatusCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeToModeWithStatusCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeWithStatusCommandField field : ChangeToModeWithStatusCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class RvcCleanModeSelect implements BaseCluster { + public static final long ID = 85L; + public long getID() { + return ID; + } + + public enum Attribute { + Description(0L), + SupportedModes(2L), + CurrentMode(3L), + StartUpMode(4L), + OnMode(5L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + ChangeToMode(0L), + ChangeToModeWithStatus(1L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum ChangeToModeCommandField {NewMode(0),; + private final int id; + ChangeToModeCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeCommandField field : ChangeToModeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ChangeToModeWithStatusCommandField {NewMode(0),; + private final int id; + ChangeToModeWithStatusCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeToModeWithStatusCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeWithStatusCommandField field : ChangeToModeWithStatusCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class TemperatureControl implements BaseCluster { + public static final long ID = 86L; + public long getID() { + return ID; + } + + public enum Attribute { + TemperatureSetpoint(0L), + MinTemperature(1L), + MaxTemperature(2L), + Step(3L), + SelectedTemperatureLevel(4L), + SupportedTemperatureLevels(5L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + SetTemperature(0L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum SetTemperatureCommandField {TargetTemperature(0),TargetTemperatureLevel(1),; + private final int id; + SetTemperatureCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetTemperatureCommandField value(int id) throws NoSuchFieldError { + for (SetTemperatureCommandField field : SetTemperatureCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class RefrigeratorAlarm implements BaseCluster { + public static final long ID = 87L; + public long getID() { + return ID; + } + + public enum Attribute { + Mask(0L), + State(2L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + Notify(0L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command {; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class DishwasherModeSelect implements BaseCluster { + public static final long ID = 89L; + public long getID() { + return ID; + } + + public enum Attribute { + Description(0L), + SupportedModes(2L), + CurrentMode(3L), + StartUpMode(4L), + OnMode(5L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + ChangeToMode(0L), + ChangeToModeWithStatus(1L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum ChangeToModeCommandField {NewMode(0),; + private final int id; + ChangeToModeCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeCommandField field : ChangeToModeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ChangeToModeWithStatusCommandField {NewMode(0),; private final int id; - ResetCommandField(int id) { + ChangeToModeWithStatusCommandField(int id) { this.id = id; } public int getID() { return id; } - public static ResetCommandField value(int id) throws NoSuchFieldError { - for (ResetCommandField field : ResetCommandField.values()) { + public static ChangeToModeWithStatusCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeWithStatusCommandField field : ChangeToModeWithStatusCommandField.values()) { if (field.getID() == id) { return field; } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 3678b7d66815f9..40a742a4b047ad 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -6056,6 +6056,620 @@ private static Map readModeSelectInteractionInfo() { return result; } + private static Map readLaundryWasherModeSelectInteractionInfo() { + Map result = new LinkedHashMap<>();Map readLaundryWasherModeSelectDescriptionCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherModeSelectDescriptionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).readDescriptionAttribute( + (ChipClusters.CharStringAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), + readLaundryWasherModeSelectDescriptionCommandParams + ); + result.put("readDescriptionAttribute", readLaundryWasherModeSelectDescriptionAttributeInteractionInfo); + Map readLaundryWasherModeSelectSupportedModesCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherModeSelectSupportedModesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).readSupportedModesAttribute( + (ChipClusters.LaundryWasherModeSelectCluster.SupportedModesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLaundryWasherModeSelectClusterSupportedModesAttributeCallback(), + readLaundryWasherModeSelectSupportedModesCommandParams + ); + result.put("readSupportedModesAttribute", readLaundryWasherModeSelectSupportedModesAttributeInteractionInfo); + Map readLaundryWasherModeSelectCurrentModeCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherModeSelectCurrentModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).readCurrentModeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readLaundryWasherModeSelectCurrentModeCommandParams + ); + result.put("readCurrentModeAttribute", readLaundryWasherModeSelectCurrentModeAttributeInteractionInfo); + Map readLaundryWasherModeSelectStartUpModeCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherModeSelectStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).readStartUpModeAttribute( + (ChipClusters.LaundryWasherModeSelectCluster.StartUpModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLaundryWasherModeSelectClusterStartUpModeAttributeCallback(), + readLaundryWasherModeSelectStartUpModeCommandParams + ); + result.put("readStartUpModeAttribute", readLaundryWasherModeSelectStartUpModeAttributeInteractionInfo); + Map readLaundryWasherModeSelectOnModeCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherModeSelectOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).readOnModeAttribute( + (ChipClusters.LaundryWasherModeSelectCluster.OnModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLaundryWasherModeSelectClusterOnModeAttributeCallback(), + readLaundryWasherModeSelectOnModeCommandParams + ); + result.put("readOnModeAttribute", readLaundryWasherModeSelectOnModeAttributeInteractionInfo); + Map readLaundryWasherModeSelectGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherModeSelectGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.LaundryWasherModeSelectCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLaundryWasherModeSelectClusterGeneratedCommandListAttributeCallback(), + readLaundryWasherModeSelectGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readLaundryWasherModeSelectGeneratedCommandListAttributeInteractionInfo); + Map readLaundryWasherModeSelectAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherModeSelectAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.LaundryWasherModeSelectCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLaundryWasherModeSelectClusterAcceptedCommandListAttributeCallback(), + readLaundryWasherModeSelectAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readLaundryWasherModeSelectAcceptedCommandListAttributeInteractionInfo); + Map readLaundryWasherModeSelectEventListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherModeSelectEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).readEventListAttribute( + (ChipClusters.LaundryWasherModeSelectCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLaundryWasherModeSelectClusterEventListAttributeCallback(), + readLaundryWasherModeSelectEventListCommandParams + ); + result.put("readEventListAttribute", readLaundryWasherModeSelectEventListAttributeInteractionInfo); + Map readLaundryWasherModeSelectAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherModeSelectAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).readAttributeListAttribute( + (ChipClusters.LaundryWasherModeSelectCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLaundryWasherModeSelectClusterAttributeListAttributeCallback(), + readLaundryWasherModeSelectAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readLaundryWasherModeSelectAttributeListAttributeInteractionInfo); + Map readLaundryWasherModeSelectFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherModeSelectFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readLaundryWasherModeSelectFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readLaundryWasherModeSelectFeatureMapAttributeInteractionInfo); + Map readLaundryWasherModeSelectClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherModeSelectClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readLaundryWasherModeSelectClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readLaundryWasherModeSelectClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readRefrigeratorAndTemperatureControlledCabinetModeSelectInteractionInfo() { + Map result = new LinkedHashMap<>();Map readRefrigeratorAndTemperatureControlledCabinetModeSelectDescriptionCommandParams = new LinkedHashMap(); + InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeSelectDescriptionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).readDescriptionAttribute( + (ChipClusters.CharStringAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), + readRefrigeratorAndTemperatureControlledCabinetModeSelectDescriptionCommandParams + ); + result.put("readDescriptionAttribute", readRefrigeratorAndTemperatureControlledCabinetModeSelectDescriptionAttributeInteractionInfo); + Map readRefrigeratorAndTemperatureControlledCabinetModeSelectSupportedModesCommandParams = new LinkedHashMap(); + InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeSelectSupportedModesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).readSupportedModesAttribute( + (ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.SupportedModesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterSupportedModesAttributeCallback(), + readRefrigeratorAndTemperatureControlledCabinetModeSelectSupportedModesCommandParams + ); + result.put("readSupportedModesAttribute", readRefrigeratorAndTemperatureControlledCabinetModeSelectSupportedModesAttributeInteractionInfo); + Map readRefrigeratorAndTemperatureControlledCabinetModeSelectCurrentModeCommandParams = new LinkedHashMap(); + InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeSelectCurrentModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).readCurrentModeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readRefrigeratorAndTemperatureControlledCabinetModeSelectCurrentModeCommandParams + ); + result.put("readCurrentModeAttribute", readRefrigeratorAndTemperatureControlledCabinetModeSelectCurrentModeAttributeInteractionInfo); + Map readRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeCommandParams = new LinkedHashMap(); + InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).readStartUpModeAttribute( + (ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.StartUpModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterStartUpModeAttributeCallback(), + readRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeCommandParams + ); + result.put("readStartUpModeAttribute", readRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeAttributeInteractionInfo); + Map readRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeCommandParams = new LinkedHashMap(); + InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).readOnModeAttribute( + (ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.OnModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterOnModeAttributeCallback(), + readRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeCommandParams + ); + result.put("readOnModeAttribute", readRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeAttributeInteractionInfo); + Map readRefrigeratorAndTemperatureControlledCabinetModeSelectGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeSelectGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterGeneratedCommandListAttributeCallback(), + readRefrigeratorAndTemperatureControlledCabinetModeSelectGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readRefrigeratorAndTemperatureControlledCabinetModeSelectGeneratedCommandListAttributeInteractionInfo); + Map readRefrigeratorAndTemperatureControlledCabinetModeSelectAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeSelectAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterAcceptedCommandListAttributeCallback(), + readRefrigeratorAndTemperatureControlledCabinetModeSelectAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readRefrigeratorAndTemperatureControlledCabinetModeSelectAcceptedCommandListAttributeInteractionInfo); + Map readRefrigeratorAndTemperatureControlledCabinetModeSelectEventListCommandParams = new LinkedHashMap(); + InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeSelectEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).readEventListAttribute( + (ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterEventListAttributeCallback(), + readRefrigeratorAndTemperatureControlledCabinetModeSelectEventListCommandParams + ); + result.put("readEventListAttribute", readRefrigeratorAndTemperatureControlledCabinetModeSelectEventListAttributeInteractionInfo); + Map readRefrigeratorAndTemperatureControlledCabinetModeSelectAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeSelectAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).readAttributeListAttribute( + (ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterAttributeListAttributeCallback(), + readRefrigeratorAndTemperatureControlledCabinetModeSelectAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readRefrigeratorAndTemperatureControlledCabinetModeSelectAttributeListAttributeInteractionInfo); + Map readRefrigeratorAndTemperatureControlledCabinetModeSelectFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeSelectFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readRefrigeratorAndTemperatureControlledCabinetModeSelectFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readRefrigeratorAndTemperatureControlledCabinetModeSelectFeatureMapAttributeInteractionInfo); + Map readRefrigeratorAndTemperatureControlledCabinetModeSelectClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeSelectClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readRefrigeratorAndTemperatureControlledCabinetModeSelectClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readRefrigeratorAndTemperatureControlledCabinetModeSelectClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readWasherControlsInteractionInfo() { + Map result = new LinkedHashMap<>();Map readWasherControlsSpinSpeedsCommandParams = new LinkedHashMap(); + InteractionInfo readWasherControlsSpinSpeedsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).readSpinSpeedsAttribute( + (ChipClusters.WasherControlsCluster.SpinSpeedsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWasherControlsClusterSpinSpeedsAttributeCallback(), + readWasherControlsSpinSpeedsCommandParams + ); + result.put("readSpinSpeedsAttribute", readWasherControlsSpinSpeedsAttributeInteractionInfo); + Map readWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap(); + InteractionInfo readWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).readSpinSpeedCurrentAttribute( + (ChipClusters.WasherControlsCluster.SpinSpeedCurrentAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWasherControlsClusterSpinSpeedCurrentAttributeCallback(), + readWasherControlsSpinSpeedCurrentCommandParams + ); + result.put("readSpinSpeedCurrentAttribute", readWasherControlsSpinSpeedCurrentAttributeInteractionInfo); + Map readWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap(); + InteractionInfo readWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).readNumberOfRinsesAttribute( + (ChipClusters.WasherControlsCluster.NumberOfRinsesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWasherControlsClusterNumberOfRinsesAttributeCallback(), + readWasherControlsNumberOfRinsesCommandParams + ); + result.put("readNumberOfRinsesAttribute", readWasherControlsNumberOfRinsesAttributeInteractionInfo); + Map readWasherControlsMaxRinsesCommandParams = new LinkedHashMap(); + InteractionInfo readWasherControlsMaxRinsesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).readMaxRinsesAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readWasherControlsMaxRinsesCommandParams + ); + result.put("readMaxRinsesAttribute", readWasherControlsMaxRinsesAttributeInteractionInfo); + Map readWasherControlsGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readWasherControlsGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.WasherControlsCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWasherControlsClusterGeneratedCommandListAttributeCallback(), + readWasherControlsGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readWasherControlsGeneratedCommandListAttributeInteractionInfo); + Map readWasherControlsAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readWasherControlsAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.WasherControlsCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWasherControlsClusterAcceptedCommandListAttributeCallback(), + readWasherControlsAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readWasherControlsAcceptedCommandListAttributeInteractionInfo); + Map readWasherControlsEventListCommandParams = new LinkedHashMap(); + InteractionInfo readWasherControlsEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).readEventListAttribute( + (ChipClusters.WasherControlsCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWasherControlsClusterEventListAttributeCallback(), + readWasherControlsEventListCommandParams + ); + result.put("readEventListAttribute", readWasherControlsEventListAttributeInteractionInfo); + Map readWasherControlsAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readWasherControlsAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).readAttributeListAttribute( + (ChipClusters.WasherControlsCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWasherControlsClusterAttributeListAttributeCallback(), + readWasherControlsAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readWasherControlsAttributeListAttributeInteractionInfo); + Map readWasherControlsFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readWasherControlsFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readWasherControlsFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readWasherControlsFeatureMapAttributeInteractionInfo); + Map readWasherControlsClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readWasherControlsClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readWasherControlsClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readWasherControlsClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readRvcRunModeSelectInteractionInfo() { + Map result = new LinkedHashMap<>();Map readRvcRunModeSelectDescriptionCommandParams = new LinkedHashMap(); + InteractionInfo readRvcRunModeSelectDescriptionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).readDescriptionAttribute( + (ChipClusters.CharStringAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), + readRvcRunModeSelectDescriptionCommandParams + ); + result.put("readDescriptionAttribute", readRvcRunModeSelectDescriptionAttributeInteractionInfo); + Map readRvcRunModeSelectSupportedModesCommandParams = new LinkedHashMap(); + InteractionInfo readRvcRunModeSelectSupportedModesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).readSupportedModesAttribute( + (ChipClusters.RvcRunModeSelectCluster.SupportedModesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcRunModeSelectClusterSupportedModesAttributeCallback(), + readRvcRunModeSelectSupportedModesCommandParams + ); + result.put("readSupportedModesAttribute", readRvcRunModeSelectSupportedModesAttributeInteractionInfo); + Map readRvcRunModeSelectCurrentModeCommandParams = new LinkedHashMap(); + InteractionInfo readRvcRunModeSelectCurrentModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).readCurrentModeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readRvcRunModeSelectCurrentModeCommandParams + ); + result.put("readCurrentModeAttribute", readRvcRunModeSelectCurrentModeAttributeInteractionInfo); + Map readRvcRunModeSelectStartUpModeCommandParams = new LinkedHashMap(); + InteractionInfo readRvcRunModeSelectStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).readStartUpModeAttribute( + (ChipClusters.RvcRunModeSelectCluster.StartUpModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcRunModeSelectClusterStartUpModeAttributeCallback(), + readRvcRunModeSelectStartUpModeCommandParams + ); + result.put("readStartUpModeAttribute", readRvcRunModeSelectStartUpModeAttributeInteractionInfo); + Map readRvcRunModeSelectOnModeCommandParams = new LinkedHashMap(); + InteractionInfo readRvcRunModeSelectOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).readOnModeAttribute( + (ChipClusters.RvcRunModeSelectCluster.OnModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcRunModeSelectClusterOnModeAttributeCallback(), + readRvcRunModeSelectOnModeCommandParams + ); + result.put("readOnModeAttribute", readRvcRunModeSelectOnModeAttributeInteractionInfo); + Map readRvcRunModeSelectGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readRvcRunModeSelectGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.RvcRunModeSelectCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcRunModeSelectClusterGeneratedCommandListAttributeCallback(), + readRvcRunModeSelectGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readRvcRunModeSelectGeneratedCommandListAttributeInteractionInfo); + Map readRvcRunModeSelectAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readRvcRunModeSelectAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.RvcRunModeSelectCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcRunModeSelectClusterAcceptedCommandListAttributeCallback(), + readRvcRunModeSelectAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readRvcRunModeSelectAcceptedCommandListAttributeInteractionInfo); + Map readRvcRunModeSelectEventListCommandParams = new LinkedHashMap(); + InteractionInfo readRvcRunModeSelectEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).readEventListAttribute( + (ChipClusters.RvcRunModeSelectCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcRunModeSelectClusterEventListAttributeCallback(), + readRvcRunModeSelectEventListCommandParams + ); + result.put("readEventListAttribute", readRvcRunModeSelectEventListAttributeInteractionInfo); + Map readRvcRunModeSelectAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readRvcRunModeSelectAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).readAttributeListAttribute( + (ChipClusters.RvcRunModeSelectCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcRunModeSelectClusterAttributeListAttributeCallback(), + readRvcRunModeSelectAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readRvcRunModeSelectAttributeListAttributeInteractionInfo); + Map readRvcRunModeSelectFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readRvcRunModeSelectFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readRvcRunModeSelectFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readRvcRunModeSelectFeatureMapAttributeInteractionInfo); + Map readRvcRunModeSelectClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readRvcRunModeSelectClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readRvcRunModeSelectClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readRvcRunModeSelectClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readRvcCleanModeSelectInteractionInfo() { + Map result = new LinkedHashMap<>();Map readRvcCleanModeSelectDescriptionCommandParams = new LinkedHashMap(); + InteractionInfo readRvcCleanModeSelectDescriptionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).readDescriptionAttribute( + (ChipClusters.CharStringAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), + readRvcCleanModeSelectDescriptionCommandParams + ); + result.put("readDescriptionAttribute", readRvcCleanModeSelectDescriptionAttributeInteractionInfo); + Map readRvcCleanModeSelectSupportedModesCommandParams = new LinkedHashMap(); + InteractionInfo readRvcCleanModeSelectSupportedModesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).readSupportedModesAttribute( + (ChipClusters.RvcCleanModeSelectCluster.SupportedModesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcCleanModeSelectClusterSupportedModesAttributeCallback(), + readRvcCleanModeSelectSupportedModesCommandParams + ); + result.put("readSupportedModesAttribute", readRvcCleanModeSelectSupportedModesAttributeInteractionInfo); + Map readRvcCleanModeSelectCurrentModeCommandParams = new LinkedHashMap(); + InteractionInfo readRvcCleanModeSelectCurrentModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).readCurrentModeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readRvcCleanModeSelectCurrentModeCommandParams + ); + result.put("readCurrentModeAttribute", readRvcCleanModeSelectCurrentModeAttributeInteractionInfo); + Map readRvcCleanModeSelectStartUpModeCommandParams = new LinkedHashMap(); + InteractionInfo readRvcCleanModeSelectStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).readStartUpModeAttribute( + (ChipClusters.RvcCleanModeSelectCluster.StartUpModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcCleanModeSelectClusterStartUpModeAttributeCallback(), + readRvcCleanModeSelectStartUpModeCommandParams + ); + result.put("readStartUpModeAttribute", readRvcCleanModeSelectStartUpModeAttributeInteractionInfo); + Map readRvcCleanModeSelectOnModeCommandParams = new LinkedHashMap(); + InteractionInfo readRvcCleanModeSelectOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).readOnModeAttribute( + (ChipClusters.RvcCleanModeSelectCluster.OnModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcCleanModeSelectClusterOnModeAttributeCallback(), + readRvcCleanModeSelectOnModeCommandParams + ); + result.put("readOnModeAttribute", readRvcCleanModeSelectOnModeAttributeInteractionInfo); + Map readRvcCleanModeSelectGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readRvcCleanModeSelectGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.RvcCleanModeSelectCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcCleanModeSelectClusterGeneratedCommandListAttributeCallback(), + readRvcCleanModeSelectGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readRvcCleanModeSelectGeneratedCommandListAttributeInteractionInfo); + Map readRvcCleanModeSelectAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readRvcCleanModeSelectAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.RvcCleanModeSelectCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcCleanModeSelectClusterAcceptedCommandListAttributeCallback(), + readRvcCleanModeSelectAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readRvcCleanModeSelectAcceptedCommandListAttributeInteractionInfo); + Map readRvcCleanModeSelectEventListCommandParams = new LinkedHashMap(); + InteractionInfo readRvcCleanModeSelectEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).readEventListAttribute( + (ChipClusters.RvcCleanModeSelectCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcCleanModeSelectClusterEventListAttributeCallback(), + readRvcCleanModeSelectEventListCommandParams + ); + result.put("readEventListAttribute", readRvcCleanModeSelectEventListAttributeInteractionInfo); + Map readRvcCleanModeSelectAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readRvcCleanModeSelectAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).readAttributeListAttribute( + (ChipClusters.RvcCleanModeSelectCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedRvcCleanModeSelectClusterAttributeListAttributeCallback(), + readRvcCleanModeSelectAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readRvcCleanModeSelectAttributeListAttributeInteractionInfo); + Map readRvcCleanModeSelectFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readRvcCleanModeSelectFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readRvcCleanModeSelectFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readRvcCleanModeSelectFeatureMapAttributeInteractionInfo); + Map readRvcCleanModeSelectClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readRvcCleanModeSelectClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readRvcCleanModeSelectClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readRvcCleanModeSelectClusterRevisionAttributeInteractionInfo); + + return result; + } private static Map readTemperatureControlInteractionInfo() { Map result = new LinkedHashMap<>();Map readTemperatureControlTemperatureSetpointCommandParams = new LinkedHashMap(); InteractionInfo readTemperatureControlTemperatureSetpointAttributeInteractionInfo = new InteractionInfo( @@ -6101,17 +6715,17 @@ private static Map readTemperatureControlInteractionInf readTemperatureControlStepCommandParams ); result.put("readStepAttribute", readTemperatureControlStepAttributeInteractionInfo); - Map readTemperatureControlCurrentTemperatureLevelIndexCommandParams = new LinkedHashMap(); - InteractionInfo readTemperatureControlCurrentTemperatureLevelIndexAttributeInteractionInfo = new InteractionInfo( + Map readTemperatureControlSelectedTemperatureLevelCommandParams = new LinkedHashMap(); + InteractionInfo readTemperatureControlSelectedTemperatureLevelAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.TemperatureControlCluster) cluster).readCurrentTemperatureLevelIndexAttribute( + ((ChipClusters.TemperatureControlCluster) cluster).readSelectedTemperatureLevelAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readTemperatureControlCurrentTemperatureLevelIndexCommandParams + readTemperatureControlSelectedTemperatureLevelCommandParams ); - result.put("readCurrentTemperatureLevelIndexAttribute", readTemperatureControlCurrentTemperatureLevelIndexAttributeInteractionInfo); + result.put("readSelectedTemperatureLevelAttribute", readTemperatureControlSelectedTemperatureLevelAttributeInteractionInfo); Map readTemperatureControlSupportedTemperatureLevelsCommandParams = new LinkedHashMap(); InteractionInfo readTemperatureControlSupportedTemperatureLevelsAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6204,17 +6818,6 @@ private static Map readRefrigeratorAlarmInteractionInfo readRefrigeratorAlarmMaskCommandParams ); result.put("readMaskAttribute", readRefrigeratorAlarmMaskAttributeInteractionInfo); - Map readRefrigeratorAlarmLatchCommandParams = new LinkedHashMap(); - InteractionInfo readRefrigeratorAlarmLatchAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RefrigeratorAlarmCluster) cluster).readLatchAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readRefrigeratorAlarmLatchCommandParams - ); - result.put("readLatchAttribute", readRefrigeratorAlarmLatchAttributeInteractionInfo); Map readRefrigeratorAlarmStateCommandParams = new LinkedHashMap(); InteractionInfo readRefrigeratorAlarmStateAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6295,6 +6898,131 @@ private static Map readRefrigeratorAlarmInteractionInfo return result; } + private static Map readDishwasherModeSelectInteractionInfo() { + Map result = new LinkedHashMap<>();Map readDishwasherModeSelectDescriptionCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherModeSelectDescriptionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).readDescriptionAttribute( + (ChipClusters.CharStringAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), + readDishwasherModeSelectDescriptionCommandParams + ); + result.put("readDescriptionAttribute", readDishwasherModeSelectDescriptionAttributeInteractionInfo); + Map readDishwasherModeSelectSupportedModesCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherModeSelectSupportedModesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).readSupportedModesAttribute( + (ChipClusters.DishwasherModeSelectCluster.SupportedModesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDishwasherModeSelectClusterSupportedModesAttributeCallback(), + readDishwasherModeSelectSupportedModesCommandParams + ); + result.put("readSupportedModesAttribute", readDishwasherModeSelectSupportedModesAttributeInteractionInfo); + Map readDishwasherModeSelectCurrentModeCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherModeSelectCurrentModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).readCurrentModeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDishwasherModeSelectCurrentModeCommandParams + ); + result.put("readCurrentModeAttribute", readDishwasherModeSelectCurrentModeAttributeInteractionInfo); + Map readDishwasherModeSelectStartUpModeCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherModeSelectStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).readStartUpModeAttribute( + (ChipClusters.DishwasherModeSelectCluster.StartUpModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDishwasherModeSelectClusterStartUpModeAttributeCallback(), + readDishwasherModeSelectStartUpModeCommandParams + ); + result.put("readStartUpModeAttribute", readDishwasherModeSelectStartUpModeAttributeInteractionInfo); + Map readDishwasherModeSelectOnModeCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherModeSelectOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).readOnModeAttribute( + (ChipClusters.DishwasherModeSelectCluster.OnModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDishwasherModeSelectClusterOnModeAttributeCallback(), + readDishwasherModeSelectOnModeCommandParams + ); + result.put("readOnModeAttribute", readDishwasherModeSelectOnModeAttributeInteractionInfo); + Map readDishwasherModeSelectGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherModeSelectGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.DishwasherModeSelectCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDishwasherModeSelectClusterGeneratedCommandListAttributeCallback(), + readDishwasherModeSelectGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readDishwasherModeSelectGeneratedCommandListAttributeInteractionInfo); + Map readDishwasherModeSelectAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherModeSelectAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.DishwasherModeSelectCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDishwasherModeSelectClusterAcceptedCommandListAttributeCallback(), + readDishwasherModeSelectAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readDishwasherModeSelectAcceptedCommandListAttributeInteractionInfo); + Map readDishwasherModeSelectEventListCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherModeSelectEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).readEventListAttribute( + (ChipClusters.DishwasherModeSelectCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDishwasherModeSelectClusterEventListAttributeCallback(), + readDishwasherModeSelectEventListCommandParams + ); + result.put("readEventListAttribute", readDishwasherModeSelectEventListAttributeInteractionInfo); + Map readDishwasherModeSelectAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherModeSelectAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).readAttributeListAttribute( + (ChipClusters.DishwasherModeSelectCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDishwasherModeSelectClusterAttributeListAttributeCallback(), + readDishwasherModeSelectAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readDishwasherModeSelectAttributeListAttributeInteractionInfo); + Map readDishwasherModeSelectFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherModeSelectFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDishwasherModeSelectFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readDishwasherModeSelectFeatureMapAttributeInteractionInfo); + Map readDishwasherModeSelectClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherModeSelectClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDishwasherModeSelectClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readDishwasherModeSelectClusterRevisionAttributeInteractionInfo); + + return result; + } private static Map readAirQualityInteractionInfo() { Map result = new LinkedHashMap<>();Map readAirQualityAirQualityCommandParams = new LinkedHashMap(); InteractionInfo readAirQualityAirQualityAttributeInteractionInfo = new InteractionInfo( @@ -22483,8 +23211,14 @@ public Map> getReadAttributeMap() { put("booleanState", readBooleanStateInteractionInfo()); put("icdManagement", readIcdManagementInteractionInfo()); put("modeSelect", readModeSelectInteractionInfo()); + put("laundryWasherModeSelect", readLaundryWasherModeSelectInteractionInfo()); + put("refrigeratorAndTemperatureControlledCabinetModeSelect", readRefrigeratorAndTemperatureControlledCabinetModeSelectInteractionInfo()); + put("washerControls", readWasherControlsInteractionInfo()); + put("rvcRunModeSelect", readRvcRunModeSelectInteractionInfo()); + put("rvcCleanModeSelect", readRvcCleanModeSelectInteractionInfo()); put("temperatureControl", readTemperatureControlInteractionInfo()); put("refrigeratorAlarm", readRefrigeratorAlarmInteractionInfo()); + put("dishwasherModeSelect", readDishwasherModeSelectInteractionInfo()); put("airQuality", readAirQualityInteractionInfo()); put("smokeCoAlarm", readSmokeCoAlarmInteractionInfo()); put("operationalState", readOperationalStateInteractionInfo()); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 4f517da9491200..3028e3525125f5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -770,32 +770,286 @@ public Map> getWriteAttributeMap() { ); writeModeSelectInteractionInfo.put("writeOnModeAttribute", writeModeSelectOnModeAttributeInteractionInfo); writeAttributeMap.put("modeSelect", writeModeSelectInteractionInfo); + Map writeLaundryWasherModeSelectInteractionInfo = new LinkedHashMap<>(); + Map writeLaundryWasherModeSelectStartUpModeCommandParams = new LinkedHashMap(); + CommandParameterInfo laundryWasherModeSelectstartUpModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeLaundryWasherModeSelectStartUpModeCommandParams.put( + "value", + laundryWasherModeSelectstartUpModeCommandParameterInfo + ); + InteractionInfo writeLaundryWasherModeSelectStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).writeStartUpModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeLaundryWasherModeSelectStartUpModeCommandParams + ); + writeLaundryWasherModeSelectInteractionInfo.put("writeStartUpModeAttribute", writeLaundryWasherModeSelectStartUpModeAttributeInteractionInfo); + Map writeLaundryWasherModeSelectOnModeCommandParams = new LinkedHashMap(); + CommandParameterInfo laundryWasherModeSelectonModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeLaundryWasherModeSelectOnModeCommandParams.put( + "value", + laundryWasherModeSelectonModeCommandParameterInfo + ); + InteractionInfo writeLaundryWasherModeSelectOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster).writeOnModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeLaundryWasherModeSelectOnModeCommandParams + ); + writeLaundryWasherModeSelectInteractionInfo.put("writeOnModeAttribute", writeLaundryWasherModeSelectOnModeAttributeInteractionInfo); + writeAttributeMap.put("laundryWasherModeSelect", writeLaundryWasherModeSelectInteractionInfo); + Map writeRefrigeratorAndTemperatureControlledCabinetModeSelectInteractionInfo = new LinkedHashMap<>(); + Map writeRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeCommandParams = new LinkedHashMap(); + CommandParameterInfo refrigeratorAndTemperatureControlledCabinetModeSelectstartUpModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeCommandParams.put( + "value", + refrigeratorAndTemperatureControlledCabinetModeSelectstartUpModeCommandParameterInfo + ); + InteractionInfo writeRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).writeStartUpModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeCommandParams + ); + writeRefrigeratorAndTemperatureControlledCabinetModeSelectInteractionInfo.put("writeStartUpModeAttribute", writeRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeAttributeInteractionInfo); + Map writeRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeCommandParams = new LinkedHashMap(); + CommandParameterInfo refrigeratorAndTemperatureControlledCabinetModeSelectonModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeCommandParams.put( + "value", + refrigeratorAndTemperatureControlledCabinetModeSelectonModeCommandParameterInfo + ); + InteractionInfo writeRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster).writeOnModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeCommandParams + ); + writeRefrigeratorAndTemperatureControlledCabinetModeSelectInteractionInfo.put("writeOnModeAttribute", writeRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeAttributeInteractionInfo); + writeAttributeMap.put("refrigeratorAndTemperatureControlledCabinetModeSelect", writeRefrigeratorAndTemperatureControlledCabinetModeSelectInteractionInfo); + Map writeWasherControlsInteractionInfo = new LinkedHashMap<>(); + Map writeWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap(); + CommandParameterInfo washerControlsspinSpeedCurrentCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeWasherControlsSpinSpeedCurrentCommandParams.put( + "value", + washerControlsspinSpeedCurrentCommandParameterInfo + ); + InteractionInfo writeWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).writeSpinSpeedCurrentAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeWasherControlsSpinSpeedCurrentCommandParams + ); + writeWasherControlsInteractionInfo.put("writeSpinSpeedCurrentAttribute", writeWasherControlsSpinSpeedCurrentAttributeInteractionInfo); + Map writeWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap(); + CommandParameterInfo washerControlsnumberOfRinsesCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeWasherControlsNumberOfRinsesCommandParams.put( + "value", + washerControlsnumberOfRinsesCommandParameterInfo + ); + InteractionInfo writeWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WasherControlsCluster) cluster).writeNumberOfRinsesAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeWasherControlsNumberOfRinsesCommandParams + ); + writeWasherControlsInteractionInfo.put("writeNumberOfRinsesAttribute", writeWasherControlsNumberOfRinsesAttributeInteractionInfo); + writeAttributeMap.put("washerControls", writeWasherControlsInteractionInfo); + Map writeRvcRunModeSelectInteractionInfo = new LinkedHashMap<>(); + Map writeRvcRunModeSelectStartUpModeCommandParams = new LinkedHashMap(); + CommandParameterInfo rvcRunModeSelectstartUpModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeRvcRunModeSelectStartUpModeCommandParams.put( + "value", + rvcRunModeSelectstartUpModeCommandParameterInfo + ); + InteractionInfo writeRvcRunModeSelectStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).writeStartUpModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeRvcRunModeSelectStartUpModeCommandParams + ); + writeRvcRunModeSelectInteractionInfo.put("writeStartUpModeAttribute", writeRvcRunModeSelectStartUpModeAttributeInteractionInfo); + Map writeRvcRunModeSelectOnModeCommandParams = new LinkedHashMap(); + CommandParameterInfo rvcRunModeSelectonModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeRvcRunModeSelectOnModeCommandParams.put( + "value", + rvcRunModeSelectonModeCommandParameterInfo + ); + InteractionInfo writeRvcRunModeSelectOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster).writeOnModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeRvcRunModeSelectOnModeCommandParams + ); + writeRvcRunModeSelectInteractionInfo.put("writeOnModeAttribute", writeRvcRunModeSelectOnModeAttributeInteractionInfo); + writeAttributeMap.put("rvcRunModeSelect", writeRvcRunModeSelectInteractionInfo); + Map writeRvcCleanModeSelectInteractionInfo = new LinkedHashMap<>(); + Map writeRvcCleanModeSelectStartUpModeCommandParams = new LinkedHashMap(); + CommandParameterInfo rvcCleanModeSelectstartUpModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeRvcCleanModeSelectStartUpModeCommandParams.put( + "value", + rvcCleanModeSelectstartUpModeCommandParameterInfo + ); + InteractionInfo writeRvcCleanModeSelectStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).writeStartUpModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeRvcCleanModeSelectStartUpModeCommandParams + ); + writeRvcCleanModeSelectInteractionInfo.put("writeStartUpModeAttribute", writeRvcCleanModeSelectStartUpModeAttributeInteractionInfo); + Map writeRvcCleanModeSelectOnModeCommandParams = new LinkedHashMap(); + CommandParameterInfo rvcCleanModeSelectonModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeRvcCleanModeSelectOnModeCommandParams.put( + "value", + rvcCleanModeSelectonModeCommandParameterInfo + ); + InteractionInfo writeRvcCleanModeSelectOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster).writeOnModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeRvcCleanModeSelectOnModeCommandParams + ); + writeRvcCleanModeSelectInteractionInfo.put("writeOnModeAttribute", writeRvcCleanModeSelectOnModeAttributeInteractionInfo); + writeAttributeMap.put("rvcCleanModeSelect", writeRvcCleanModeSelectInteractionInfo); Map writeTemperatureControlInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("temperatureControl", writeTemperatureControlInteractionInfo); Map writeRefrigeratorAlarmInteractionInfo = new LinkedHashMap<>(); - Map writeRefrigeratorAlarmMaskCommandParams = new LinkedHashMap(); - CommandParameterInfo refrigeratorAlarmmaskCommandParameterInfo = + writeAttributeMap.put("refrigeratorAlarm", writeRefrigeratorAlarmInteractionInfo); + Map writeDishwasherModeSelectInteractionInfo = new LinkedHashMap<>(); + Map writeDishwasherModeSelectStartUpModeCommandParams = new LinkedHashMap(); + CommandParameterInfo dishwasherModeSelectstartUpModeCommandParameterInfo = new CommandParameterInfo( "value", - Long.class, - Long.class + Integer.class, + Integer.class ); - writeRefrigeratorAlarmMaskCommandParams.put( + writeDishwasherModeSelectStartUpModeCommandParams.put( "value", - refrigeratorAlarmmaskCommandParameterInfo + dishwasherModeSelectstartUpModeCommandParameterInfo ); - InteractionInfo writeRefrigeratorAlarmMaskAttributeInteractionInfo = new InteractionInfo( + InteractionInfo writeDishwasherModeSelectStartUpModeAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.RefrigeratorAlarmCluster) cluster).writeMaskAttribute( + ((ChipClusters.DishwasherModeSelectCluster) cluster).writeStartUpModeAttribute( (DefaultClusterCallback) callback, - (Long) commandArguments.get("value") + (Integer) commandArguments.get("value") ); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeRefrigeratorAlarmMaskCommandParams + writeDishwasherModeSelectStartUpModeCommandParams ); - writeRefrigeratorAlarmInteractionInfo.put("writeMaskAttribute", writeRefrigeratorAlarmMaskAttributeInteractionInfo); - writeAttributeMap.put("refrigeratorAlarm", writeRefrigeratorAlarmInteractionInfo); + writeDishwasherModeSelectInteractionInfo.put("writeStartUpModeAttribute", writeDishwasherModeSelectStartUpModeAttributeInteractionInfo); + Map writeDishwasherModeSelectOnModeCommandParams = new LinkedHashMap(); + CommandParameterInfo dishwasherModeSelectonModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeDishwasherModeSelectOnModeCommandParams.put( + "value", + dishwasherModeSelectonModeCommandParameterInfo + ); + InteractionInfo writeDishwasherModeSelectOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster).writeOnModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeDishwasherModeSelectOnModeCommandParams + ); + writeDishwasherModeSelectInteractionInfo.put("writeOnModeAttribute", writeDishwasherModeSelectOnModeAttributeInteractionInfo); + writeAttributeMap.put("dishwasherModeSelect", writeDishwasherModeSelectInteractionInfo); Map writeAirQualityInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("airQuality", writeAirQualityInteractionInfo); Map writeSmokeCoAlarmInteractionInfo = new LinkedHashMap<>(); diff --git a/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt b/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt index ec866ad9df5d9e..0f925a973bfde4 100644 --- a/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt +++ b/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt @@ -97,6 +97,7 @@ class ManualOnboardingPayloadParser(decimalRepresentation: String) { outPayload.setupPinCode = setUpPINCode require(kManualSetupDiscriminatorFieldLengthInBits <= 8) { "Won't fit in UInt8" } outPayload.discriminator = discriminator + outPayload.hasShortDiscriminator = true } companion object { diff --git a/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt b/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt index 660d0a47d1ffdb..a8432a36d474aa 100644 --- a/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt +++ b/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt @@ -847,7 +847,14 @@ class OnboardingPayload( return discriminator } return longToShortValue(discriminator) - } + } + + fun getLongDiscriminatorValue(): Int { + if (hasShortDiscriminator) { + return shortToLongValue(discriminator) + } + return discriminator + } private fun checkPayloadCommonConstraints(): Boolean { if (version != 0) { @@ -885,6 +892,10 @@ class OnboardingPayload( private fun longToShortValue(longValue: Int): Int { return (longValue shr (kDiscriminatorLongBits - kDiscriminatorShortBits)) } + + private fun shortToLongValue(shortValue: Int): Int { + return (shortValue shl (kDiscriminatorLongBits - kDiscriminatorShortBits)) + } } } diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index b01814f5a9a2c4..0248cc27172020 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -11953,47 +11953,68 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string newElement_0_modeCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); - jobject newElement_0_semanticTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); - while (iter_newElement_0_semanticTags_2.Next()) + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) { - auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; - std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeClassName.c_str(), newElement_2_mfgCodeCtorSignature.c_str(), - static_cast(entry_2.mfgCode), newElement_2_mfgCode); + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), static_cast(entry_2.mfgCode.Value()), + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } - jclass semanticTagStructStructClass_3; + jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", - semanticTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeTagStruct"); return nullptr; } - jmethodID semanticTagStructStructCtor_3 = - env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (semanticTagStructStructCtor_3 == nullptr) + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeTagStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, - newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } jclass modeOptionStructStructClass_1; @@ -12013,7 +12034,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_semanticTags); + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12209,12 +12230,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::TemperatureControl::Id: { - using namespace app::Clusters::TemperatureControl; + case app::Clusters::LaundryWasherModeSelect::Id: { + using namespace app::Clusters::LaundryWasherModeSelect; switch (aPath.mAttributeId) { - case Attributes::TemperatureSetpoint::Id: { - using TypeInfo = Attributes::TemperatureSetpoint::TypeInfo; + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -12222,14 +12243,11 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } - case Attributes::MinTemperature::Id: { - using TypeInfo = Attributes::MinTemperature::TypeInfo; + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -12237,29 +12255,110 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); - return value; - } - case Attributes::MaxTemperature::Id: { - using TypeInfo = Attributes::MaxTemperature::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) { - return nullptr; + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), static_cast(entry_2.mfgCode.Value()), + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeSelectClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeSelectClusterModeTagStruct"); + return nullptr; + } + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeSelectClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeSelectClusterModeOptionStruct", + modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeSelectClusterModeOptionStruct"); + return nullptr; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( + modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeSelectClusterModeOptionStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); return value; } - case Attributes::Step::Id: { - using TypeInfo = Attributes::Step::TypeInfo; + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -12269,12 +12368,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, value); return value; } - case Attributes::CurrentTemperatureLevelIndex::Id: { - using TypeInfo = Attributes::CurrentTemperatureLevelIndex::TypeInfo; + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -12282,14 +12381,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } return value; } - case Attributes::SupportedTemperatureLevels::Id: { - using TypeInfo = Attributes::SupportedTemperatureLevels::TypeInfo; + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -12297,42 +12403,16 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) + if (cppValue.IsNull()) { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_temperatureLevel; - std::string newElement_0_temperatureLevelClassName = "java/lang/Integer"; - std::string newElement_0_temperatureLevelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_temperatureLevelClassName.c_str(), newElement_0_temperatureLevelCtorSignature.c_str(), - entry_0.temperatureLevel, newElement_0_temperatureLevel); - - jclass temperatureLevelStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$TemperatureControlClusterTemperatureLevelStruct", - temperatureLevelStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TemperatureControlClusterTemperatureLevelStruct"); - return nullptr; - } - jmethodID temperatureLevelStructStructCtor_1 = - env->GetMethodID(temperatureLevelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;)V"); - if (temperatureLevelStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TemperatureControlClusterTemperatureLevelStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(temperatureLevelStructStructClass_1, temperatureLevelStructStructCtor_1, - newElement_0_label, newElement_0_temperatureLevel); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); } return value; } @@ -12468,12 +12548,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::RefrigeratorAlarm::Id: { - using namespace app::Clusters::RefrigeratorAlarm; + case app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id: { + using namespace app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect; switch (aPath.mAttributeId) { - case Attributes::Mask::Id: { - using TypeInfo = Attributes::Mask::TypeInfo; + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -12481,14 +12561,11 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } - case Attributes::Latch::Id: { - using TypeInfo = Attributes::Latch::TypeInfo; + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -12496,14 +12573,124 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), static_cast(entry_2.mfgCode.Value()), + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, + "chip/devicecontroller/" + "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class " + "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeTagStruct"); + return nullptr; + } + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeTagStruct " + "constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, + "chip/devicecontroller/" + "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeOptionStruct", + modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class " + "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeOptionStruct"); + return nullptr; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( + modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeOptionStruct " + "constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } - case Attributes::State::Id: { - using TypeInfo = Attributes::State::TypeInfo; + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -12511,10 +12698,1621 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::WasherControls::Id: { + using namespace app::Clusters::WasherControls; + switch (aPath.mAttributeId) + { + case Attributes::SpinSpeeds::Id: { + using TypeInfo = Attributes::SpinSpeeds::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::SpinSpeedCurrent::Id: { + using TypeInfo = Attributes::SpinSpeedCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::NumberOfRinses::Id: { + using TypeInfo = Attributes::NumberOfRinses::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::MaxRinses::Id: { + using TypeInfo = Attributes::MaxRinses::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::RvcRunModeSelect::Id: { + using namespace app::Clusters::RvcRunModeSelect; + switch (aPath.mAttributeId) + { + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); + return value; + } + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), static_cast(entry_2.mfgCode.Value()), + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcRunModeSelectClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeSelectClusterModeTagStruct"); + return nullptr; + } + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeSelectClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcRunModeSelectClusterModeOptionStruct", + modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeSelectClusterModeOptionStruct"); + return nullptr; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( + modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeSelectClusterModeOptionStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::RvcCleanModeSelect::Id: { + using namespace app::Clusters::RvcCleanModeSelect; + switch (aPath.mAttributeId) + { + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); + return value; + } + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), static_cast(entry_2.mfgCode.Value()), + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcCleanModeSelectClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeSelectClusterModeTagStruct"); + return nullptr; + } + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeSelectClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcCleanModeSelectClusterModeOptionStruct", + modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeSelectClusterModeOptionStruct"); + return nullptr; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( + modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeSelectClusterModeOptionStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::TemperatureControl::Id: { + using namespace app::Clusters::TemperatureControl; + switch (aPath.mAttributeId) + { + case Attributes::TemperatureSetpoint::Id: { + using TypeInfo = Attributes::TemperatureSetpoint::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::MinTemperature::Id: { + using TypeInfo = Attributes::MinTemperature::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::MaxTemperature::Id: { + using TypeInfo = Attributes::MaxTemperature::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::Step::Id: { + using TypeInfo = Attributes::Step::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::SelectedTemperatureLevel::Id: { + using TypeInfo = Attributes::SelectedTemperatureLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::SupportedTemperatureLevels::Id: { + using TypeInfo = Attributes::SupportedTemperatureLevels::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::RefrigeratorAlarm::Id: { + using namespace app::Clusters::RefrigeratorAlarm; + switch (aPath.mAttributeId) + { + case Attributes::Mask::Id: { + using TypeInfo = Attributes::Mask::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Raw(), value); + return value; + } + case Attributes::State::Id: { + using TypeInfo = Attributes::State::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Raw(), value); + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::DishwasherModeSelect::Id: { + using namespace app::Clusters::DishwasherModeSelect; + switch (aPath.mAttributeId) + { + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); + return value; + } + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), static_cast(entry_2.mfgCode.Value()), + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeSelectClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeSelectClusterModeTagStruct"); + return nullptr; + } + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeSelectClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeSelectClusterModeOptionStruct", + modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeSelectClusterModeOptionStruct"); + return nullptr; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( + modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeSelectClusterModeOptionStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } return value; } case Attributes::GeneratedCommandList::Id: { diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h index bdaa258a384bf1..b7537c2e38ad24 100644 --- a/src/controller/java/zap-generated/CHIPClientCallbacks.h +++ b/src/controller/java/zap-generated/CHIPClientCallbacks.h @@ -475,10 +475,67 @@ typedef void (*ModeSelectEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureControlSupportedTemperatureLevelsListAttributeCallback)( +typedef void (*LaundryWasherModeSelectSupportedModesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> & data); + chip::app::Clusters::LaundryWasherModeSelect::Structs::ModeOptionStruct::DecodableType> & data); +typedef void (*LaundryWasherModeSelectGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherModeSelectAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherModeSelectEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherModeSelectAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RefrigeratorAndTemperatureControlledCabinetModeSelectSupportedModesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Structs::ModeOptionStruct::DecodableType> & + data); +typedef void (*RefrigeratorAndTemperatureControlledCabinetModeSelectGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RefrigeratorAndTemperatureControlledCabinetModeSelectAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RefrigeratorAndTemperatureControlledCabinetModeSelectEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RefrigeratorAndTemperatureControlledCabinetModeSelectAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WasherControlsSpinSpeedsListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*WasherControlsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WasherControlsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WasherControlsEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*WasherControlsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RvcRunModeSelectSupportedModesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*RvcRunModeSelectGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RvcRunModeSelectAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RvcRunModeSelectEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*RvcRunModeSelectAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RvcCleanModeSelectSupportedModesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*RvcCleanModeSelectGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RvcCleanModeSelectAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RvcCleanModeSelectEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*RvcCleanModeSelectAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TemperatureControlSupportedTemperatureLevelsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlAcceptedCommandListListAttributeCallback)( @@ -495,6 +552,18 @@ typedef void (*RefrigeratorAlarmEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RefrigeratorAlarmAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DishwasherModeSelectSupportedModesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*DishwasherModeSelectGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DishwasherModeSelectAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DishwasherModeSelectEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*DishwasherModeSelectAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AirQualityGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AirQualityAcceptedCommandListListAttributeCallback)( diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index e26b3a1aaae856..237ebacd4ac70c 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -2342,19 +2342,689 @@ JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) onFailure.release(); } -JNI_METHOD(void, RefrigeratorAlarmCluster, writeMaskAttribute) +JNI_METHOD(void, LaundryWasherModeSelectCluster, writeStartUpModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; ListFreer listFreer; - using TypeInfo = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = chip::app::Clusters::LaundryWasherModeSelect::Attributes::StartUpMode::TypeInfo; TypeInfo::Type cppValue; std::vector> cleanupByteArrays; std::vector> cleanupStrings; - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().LongToPrimitive(value))); + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LaundryWasherModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LaundryWasherModeSelectCluster, writeOnModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::LaundryWasherModeSelect::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LaundryWasherModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, RefrigeratorAndTemperatureControlledCabinetModeSelectCluster, writeStartUpModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + RefrigeratorAndTemperatureControlledCabinetModeSelectCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, RefrigeratorAndTemperatureControlledCabinetModeSelectCluster, writeOnModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + RefrigeratorAndTemperatureControlledCabinetModeSelectCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, WasherControlsCluster, writeSpinSpeedCurrentAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::WasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + WasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, WasherControlsCluster, writeNumberOfRinsesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::WasherControls::Attributes::NumberOfRinses::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + WasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, RvcRunModeSelectCluster, writeStartUpModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::RvcRunModeSelect::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + RvcRunModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, RvcRunModeSelectCluster, writeOnModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::RvcRunModeSelect::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + RvcRunModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, RvcCleanModeSelectCluster, writeStartUpModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::RvcCleanModeSelect::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + RvcCleanModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, RvcCleanModeSelectCluster, writeOnModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::RvcCleanModeSelect::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + RvcCleanModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, DishwasherModeSelectCluster, writeStartUpModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::DishwasherModeSelect::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + DishwasherModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, DishwasherModeSelectCluster, writeOnModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::DishwasherModeSelect::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2368,8 +3038,8 @@ JNI_METHOD(void, RefrigeratorAlarmCluster, writeMaskAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - RefrigeratorAlarmCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + DishwasherModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 1874cb355bd6f2..03ebc2ef9083f4 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -2425,6 +2425,56 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } + case app::Clusters::LaundryWasherModeSelect::Id: { + using namespace app::Clusters::LaundryWasherModeSelect; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id: { + using namespace app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::WasherControls::Id: { + using namespace app::Clusters::WasherControls; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::RvcRunModeSelect::Id: { + using namespace app::Clusters::RvcRunModeSelect; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::RvcCleanModeSelect::Id: { + using namespace app::Clusters::RvcCleanModeSelect; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case app::Clusters::TemperatureControl::Id: { using namespace app::Clusters::TemperatureControl; switch (aPath.mEventId) @@ -2497,6 +2547,16 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } + case app::Clusters::DishwasherModeSelect::Id: { + using namespace app::Clusters::DishwasherModeSelect; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case app::Clusters::AirQuality::Id: { using namespace app::Clusters::AirQuality; switch (aPath.mEventId) diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 6edbeeb3e9f028..dacb197027abec 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -2811,6 +2811,456 @@ void CHIPIcdManagementClusterRegisterClientResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, ICDCounter); } +CHIPModeSelectClusterChangeToModeResponseCallback::CHIPModeSelectClusterChangeToModeResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPModeSelectClusterChangeToModeResponseCallback::~CHIPModeSelectClusterChangeToModeResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPModeSelectClusterChangeToModeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ModeSelect::Commands::ChangeToModeResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + dataResponse.status, Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); +} +CHIPLaundryWasherModeSelectClusterChangeToModeResponseCallback::CHIPLaundryWasherModeSelectClusterChangeToModeResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLaundryWasherModeSelectClusterChangeToModeResponseCallback::~CHIPLaundryWasherModeSelectClusterChangeToModeResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPLaundryWasherModeSelectClusterChangeToModeResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::LaundryWasherModeSelect::Commands::ChangeToModeResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + dataResponse.status, Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); +} +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeResponseCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, + this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeResponseCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Commands::ChangeToModeResponse:: + DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback( + reinterpret_cast( + context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + dataResponse.status, Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); +} +CHIPRvcRunModeSelectClusterChangeToModeResponseCallback::CHIPRvcRunModeSelectClusterChangeToModeResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcRunModeSelectClusterChangeToModeResponseCallback::~CHIPRvcRunModeSelectClusterChangeToModeResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPRvcRunModeSelectClusterChangeToModeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::RvcRunModeSelect::Commands::ChangeToModeResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + dataResponse.status, Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); +} +CHIPRvcCleanModeSelectClusterChangeToModeResponseCallback::CHIPRvcCleanModeSelectClusterChangeToModeResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcCleanModeSelectClusterChangeToModeResponseCallback::~CHIPRvcCleanModeSelectClusterChangeToModeResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPRvcCleanModeSelectClusterChangeToModeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::RvcCleanModeSelect::Commands::ChangeToModeResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + dataResponse.status, Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); +} +CHIPDishwasherModeSelectClusterChangeToModeResponseCallback::CHIPDishwasherModeSelectClusterChangeToModeResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherModeSelectClusterChangeToModeResponseCallback::~CHIPDishwasherModeSelectClusterChangeToModeResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPDishwasherModeSelectClusterChangeToModeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::DishwasherModeSelect::Commands::ChangeToModeResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + dataResponse.status, Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); +} CHIPOperationalStateClusterOperationalCommandResponseCallback::CHIPOperationalStateClusterOperationalCommandResponseCallback( jobject javaCallback) : Callback::Callback(CallbackFn, this) diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index be47968fb6a199..585195f541e966 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -464,6 +464,98 @@ class CHIPIcdManagementClusterRegisterClientResponseCallback jobject javaCallbackRef; }; +class CHIPModeSelectClusterChangeToModeResponseCallback + : public Callback::Callback +{ +public: + CHIPModeSelectClusterChangeToModeResponseCallback(jobject javaCallback); + + ~CHIPModeSelectClusterChangeToModeResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ModeSelect::Commands::ChangeToModeResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPLaundryWasherModeSelectClusterChangeToModeResponseCallback + : public Callback::Callback +{ +public: + CHIPLaundryWasherModeSelectClusterChangeToModeResponseCallback(jobject javaCallback); + + ~CHIPLaundryWasherModeSelectClusterChangeToModeResponseCallback(); + + static void + CallbackFn(void * context, + const chip::app::Clusters::LaundryWasherModeSelect::Commands::ChangeToModeResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeResponseCallback + : public Callback::Callback +{ +public: + CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeResponseCallback(jobject javaCallback); + + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Commands:: + ChangeToModeResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPRvcRunModeSelectClusterChangeToModeResponseCallback + : public Callback::Callback +{ +public: + CHIPRvcRunModeSelectClusterChangeToModeResponseCallback(jobject javaCallback); + + ~CHIPRvcRunModeSelectClusterChangeToModeResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::RvcRunModeSelect::Commands::ChangeToModeResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPRvcCleanModeSelectClusterChangeToModeResponseCallback + : public Callback::Callback +{ +public: + CHIPRvcCleanModeSelectClusterChangeToModeResponseCallback(jobject javaCallback); + + ~CHIPRvcCleanModeSelectClusterChangeToModeResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::RvcCleanModeSelect::Commands::ChangeToModeResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPDishwasherModeSelectClusterChangeToModeResponseCallback + : public Callback::Callback +{ +public: + CHIPDishwasherModeSelectClusterChangeToModeResponseCallback(jobject javaCallback); + + ~CHIPDishwasherModeSelectClusterChangeToModeResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::DishwasherModeSelect::Commands::ChangeToModeResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPOperationalStateClusterOperationalCommandResponseCallback : public Callback::Callback { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 8b72cc192cd064..23be9ec0902b8f 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -19764,45 +19764,66 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( std::string newElement_0_modeCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); - jobject newElement_0_semanticTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); - while (iter_newElement_0_semanticTags_2.Next()) + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) { - auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; - std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeClassName.c_str(), newElement_2_mfgCodeCtorSignature.c_str(), - static_cast(entry_2.mfgCode), newElement_2_mfgCode); + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + static_cast(entry_2.mfgCode.Value()), newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } - jclass semanticTagStructStructClass_3; + jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", semanticTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeTagStruct"); return; } - jmethodID semanticTagStructStructCtor_3 = - env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (semanticTagStructStructCtor_3 == nullptr) + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeTagStruct constructor"); return; } - newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } jclass modeOptionStructStructClass_1; @@ -19822,7 +19843,7 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_semanticTags); + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20238,9 +20259,9 @@ void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: - CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherModeSelectSupportedModesAttributeCallback::CHIPLaundryWasherModeSelectSupportedModesAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20257,8 +20278,7 @@ CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: } } -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: - ~CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback() +CHIPLaundryWasherModeSelectSupportedModesAttributeCallback::~CHIPLaundryWasherModeSelectSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20269,10 +20289,10 @@ CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::CallbackFn( +void CHIPLaundryWasherModeSelectSupportedModesAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> & list) + chip::app::Clusters::LaundryWasherModeSelect::Structs::ModeOptionStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20281,8 +20301,8 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20303,32 +20323,91 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_temperatureLevel; - std::string newElement_0_temperatureLevelClassName = "java/lang/Integer"; - std::string newElement_0_temperatureLevelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_temperatureLevelClassName.c_str(), - newElement_0_temperatureLevelCtorSignature.c_str(), - entry_0.temperatureLevel, newElement_0_temperatureLevel); - - jclass temperatureLevelStructStructClass_1; + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + static_cast(entry_2.mfgCode.Value()), newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeSelectClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeSelectClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeSelectClusterModeTagStruct constructor"); + return; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$TemperatureControlClusterTemperatureLevelStruct", - temperatureLevelStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$TemperatureControlClusterTemperatureLevelStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeSelectClusterModeOptionStruct"); return; } - jmethodID temperatureLevelStructStructCtor_1 = - env->GetMethodID(temperatureLevelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;)V"); - if (temperatureLevelStructStructCtor_1 == nullptr) + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$TemperatureControlClusterTemperatureLevelStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeSelectClusterModeOptionStruct constructor"); return; } - newElement_0 = env->NewObject(temperatureLevelStructStructClass_1, temperatureLevelStructStructCtor_1, newElement_0_label, - newElement_0_temperatureLevel); + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20336,9 +20415,9 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureControlGeneratedCommandListAttributeCallback( +CHIPLaundryWasherModeSelectStartUpModeAttributeCallback::CHIPLaundryWasherModeSelectStartUpModeAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20355,7 +20434,7 @@ CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureCont } } -CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureControlGeneratedCommandListAttributeCallback() +CHIPLaundryWasherModeSelectStartUpModeAttributeCallback::~CHIPLaundryWasherModeSelectStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20366,8 +20445,8 @@ CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureCon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20375,9 +20454,8 @@ void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20385,31 +20463,28 @@ void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureControlAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherModeSelectOnModeAttributeCallback::CHIPLaundryWasherModeSelectOnModeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20426,7 +20501,7 @@ CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureContr } } -CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureControlAcceptedCommandListAttributeCallback() +CHIPLaundryWasherModeSelectOnModeAttributeCallback::~CHIPLaundryWasherModeSelectOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20437,8 +20512,8 @@ CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureCont env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeSelectOnModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20446,9 +20521,8 @@ void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20456,31 +20530,28 @@ void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherModeSelectGeneratedCommandListAttributeCallback::CHIPLaundryWasherModeSelectGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20497,7 +20568,8 @@ CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventLis } } -CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventListAttributeCallback() +CHIPLaundryWasherModeSelectGeneratedCommandListAttributeCallback:: + ~CHIPLaundryWasherModeSelectGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20508,8 +20580,8 @@ CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeSelectGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20518,8 +20590,8 @@ void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20549,9 +20621,9 @@ void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherModeSelectAcceptedCommandListAttributeCallback::CHIPLaundryWasherModeSelectAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20568,7 +20640,7 @@ CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttr } } -CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAttributeListAttributeCallback() +CHIPLaundryWasherModeSelectAcceptedCommandListAttributeCallback::~CHIPLaundryWasherModeSelectAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20579,8 +20651,8 @@ CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAtt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeSelectAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20589,8 +20661,8 @@ void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20620,9 +20692,9 @@ void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherModeSelectEventListAttributeCallback::CHIPLaundryWasherModeSelectEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20639,7 +20711,7 @@ CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlar } } -CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback() +CHIPLaundryWasherModeSelectEventListAttributeCallback::~CHIPLaundryWasherModeSelectEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20650,8 +20722,8 @@ CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAla env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeSelectEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20660,8 +20732,8 @@ void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20691,9 +20763,9 @@ void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback( +CHIPLaundryWasherModeSelectAttributeListAttributeCallback::CHIPLaundryWasherModeSelectAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20710,7 +20782,7 @@ CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarm } } -CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback() +CHIPLaundryWasherModeSelectAttributeListAttributeCallback::~CHIPLaundryWasherModeSelectAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20721,8 +20793,8 @@ CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlar env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeSelectAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20731,8 +20803,8 @@ void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20762,9 +20834,10 @@ void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectSupportedModesAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20781,7 +20854,8 @@ CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListA } } -CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectSupportedModesAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20792,8 +20866,11 @@ CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Structs::ModeOptionStruct::DecodableType> & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20802,8 +20879,11 @@ void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20822,10 +20902,103 @@ void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + static_cast(entry_2.mfgCode.Value()), newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeTagStruct " + "constructor"); + return; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeOptionStruct", + modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeOptionStruct " + "constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20833,9 +21006,10 @@ void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20852,7 +21026,8 @@ CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttrib } } -CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttributeListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20863,8 +21038,2646 @@ CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttri env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectStartUpModeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectOnModeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectGeneratedCommandListAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback< + CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectClusterGeneratedCommandListAttributeCallbackType>(CallbackFn, + this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectGeneratedCommandListAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr + cppCallback( + reinterpret_cast( + context), + maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectAcceptedCommandListAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback< + CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectClusterAcceptedCommandListAttributeCallbackType>(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectAcceptedCommandListAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr + cppCallback( + reinterpret_cast( + context), + maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectEventListAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectEventListAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectAttributeListAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectAttributeListAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRefrigeratorAndTemperatureControlledCabinetModeSelectAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWasherControlsSpinSpeedsAttributeCallback::CHIPWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWasherControlsSpinSpeedsAttributeCallback::~CHIPWasherControlsSpinSpeedsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWasherControlsSpinSpeedsAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CHIPWasherControlsSpinSpeedCurrentAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPWasherControlsSpinSpeedCurrentAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWasherControlsNumberOfRinsesAttributeCallback::CHIPWasherControlsNumberOfRinsesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWasherControlsNumberOfRinsesAttributeCallback::~CHIPWasherControlsNumberOfRinsesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWasherControlsNumberOfRinsesAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWasherControlsGeneratedCommandListAttributeCallback::CHIPWasherControlsGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWasherControlsGeneratedCommandListAttributeCallback::~CHIPWasherControlsGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWasherControlsAcceptedCommandListAttributeCallback::CHIPWasherControlsAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWasherControlsAcceptedCommandListAttributeCallback::~CHIPWasherControlsAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWasherControlsEventListAttributeCallback::CHIPWasherControlsEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWasherControlsEventListAttributeCallback::~CHIPWasherControlsEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWasherControlsEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWasherControlsAttributeListAttributeCallback::CHIPWasherControlsAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWasherControlsAttributeListAttributeCallback::~CHIPWasherControlsAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWasherControlsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcRunModeSelectSupportedModesAttributeCallback::CHIPRvcRunModeSelectSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcRunModeSelectSupportedModesAttributeCallback::~CHIPRvcRunModeSelectSupportedModesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcRunModeSelectSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + static_cast(entry_2.mfgCode.Value()), newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcRunModeSelectClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeSelectClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeSelectClusterModeTagStruct constructor"); + return; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcRunModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeSelectClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeSelectClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcRunModeSelectStartUpModeAttributeCallback::CHIPRvcRunModeSelectStartUpModeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcRunModeSelectStartUpModeAttributeCallback::~CHIPRvcRunModeSelectStartUpModeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcRunModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPRvcRunModeSelectOnModeAttributeCallback::CHIPRvcRunModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcRunModeSelectOnModeAttributeCallback::~CHIPRvcRunModeSelectOnModeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcRunModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPRvcRunModeSelectGeneratedCommandListAttributeCallback::CHIPRvcRunModeSelectGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcRunModeSelectGeneratedCommandListAttributeCallback::~CHIPRvcRunModeSelectGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcRunModeSelectGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcRunModeSelectAcceptedCommandListAttributeCallback::CHIPRvcRunModeSelectAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcRunModeSelectAcceptedCommandListAttributeCallback::~CHIPRvcRunModeSelectAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcRunModeSelectAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcRunModeSelectEventListAttributeCallback::CHIPRvcRunModeSelectEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcRunModeSelectEventListAttributeCallback::~CHIPRvcRunModeSelectEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcRunModeSelectEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcRunModeSelectAttributeListAttributeCallback::CHIPRvcRunModeSelectAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcRunModeSelectAttributeListAttributeCallback::~CHIPRvcRunModeSelectAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcRunModeSelectAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcCleanModeSelectSupportedModesAttributeCallback::CHIPRvcCleanModeSelectSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcCleanModeSelectSupportedModesAttributeCallback::~CHIPRvcCleanModeSelectSupportedModesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcCleanModeSelectSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + static_cast(entry_2.mfgCode.Value()), newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcCleanModeSelectClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeSelectClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeSelectClusterModeTagStruct constructor"); + return; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcCleanModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeSelectClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeSelectClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcCleanModeSelectStartUpModeAttributeCallback::CHIPRvcCleanModeSelectStartUpModeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcCleanModeSelectStartUpModeAttributeCallback::~CHIPRvcCleanModeSelectStartUpModeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcCleanModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPRvcCleanModeSelectOnModeAttributeCallback::CHIPRvcCleanModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcCleanModeSelectOnModeAttributeCallback::~CHIPRvcCleanModeSelectOnModeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcCleanModeSelectOnModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPRvcCleanModeSelectGeneratedCommandListAttributeCallback::CHIPRvcCleanModeSelectGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcCleanModeSelectGeneratedCommandListAttributeCallback::~CHIPRvcCleanModeSelectGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcCleanModeSelectGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcCleanModeSelectAcceptedCommandListAttributeCallback::CHIPRvcCleanModeSelectAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcCleanModeSelectAcceptedCommandListAttributeCallback::~CHIPRvcCleanModeSelectAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcCleanModeSelectAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcCleanModeSelectEventListAttributeCallback::CHIPRvcCleanModeSelectEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcCleanModeSelectEventListAttributeCallback::~CHIPRvcCleanModeSelectEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcCleanModeSelectEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcCleanModeSelectAttributeListAttributeCallback::CHIPRvcCleanModeSelectAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcCleanModeSelectAttributeListAttributeCallback::~CHIPRvcCleanModeSelectAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcCleanModeSelectAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: + CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: + ~CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureControlGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureControlGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureControlAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureControlAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20904,6 +23717,580 @@ void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPDishwasherModeSelectSupportedModesAttributeCallback::CHIPDishwasherModeSelectSupportedModesAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherModeSelectSupportedModesAttributeCallback::~CHIPDishwasherModeSelectSupportedModesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDishwasherModeSelectSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + static_cast(entry_2.mfgCode.Value()), newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jobject newElement_2_tagName; + if (!entry_2.tagName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tagName); + } + else + { + jobject newElement_2_tagNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2.tagName.Value(), + newElement_2_tagNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_tagNameInsideOptional, newElement_2_tagName); + } + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeSelectClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeSelectClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = env->GetMethodID( + modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeSelectClusterModeTagStruct constructor"); + return; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value, newElement_2_tagName); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeSelectClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeSelectClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDishwasherModeSelectStartUpModeAttributeCallback::CHIPDishwasherModeSelectStartUpModeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherModeSelectStartUpModeAttributeCallback::~CHIPDishwasherModeSelectStartUpModeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDishwasherModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPDishwasherModeSelectOnModeAttributeCallback::CHIPDishwasherModeSelectOnModeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherModeSelectOnModeAttributeCallback::~CHIPDishwasherModeSelectOnModeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDishwasherModeSelectOnModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPDishwasherModeSelectGeneratedCommandListAttributeCallback::CHIPDishwasherModeSelectGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherModeSelectGeneratedCommandListAttributeCallback::~CHIPDishwasherModeSelectGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDishwasherModeSelectGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDishwasherModeSelectAcceptedCommandListAttributeCallback::CHIPDishwasherModeSelectAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherModeSelectAcceptedCommandListAttributeCallback::~CHIPDishwasherModeSelectAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDishwasherModeSelectAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDishwasherModeSelectEventListAttributeCallback::CHIPDishwasherModeSelectEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherModeSelectEventListAttributeCallback::~CHIPDishwasherModeSelectEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDishwasherModeSelectEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDishwasherModeSelectAttributeListAttributeCallback::CHIPDishwasherModeSelectAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherModeSelectAttributeListAttributeCallback::~CHIPDishwasherModeSelectAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDishwasherModeSelectAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPAirQualityGeneratedCommandListAttributeCallback::CHIPAirQualityGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index e8125bf824672e..f9aca55fe803e6 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -11870,14 +11870,14 @@ public void keySetRemove(DefaultClusterCallback callback } public void keySetReadAllIndices(KeySetReadAllIndicesResponseCallback callback - , ArrayList groupKeySetIDs) { - keySetReadAllIndices(chipClusterPtr, callback, groupKeySetIDs, null); + ) { + keySetReadAllIndices(chipClusterPtr, callback, null); } public void keySetReadAllIndices(KeySetReadAllIndicesResponseCallback callback - , ArrayList groupKeySetIDs + , int timedInvokeTimeoutMs) { - keySetReadAllIndices(chipClusterPtr, callback, groupKeySetIDs, timedInvokeTimeoutMs); + keySetReadAllIndices(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void keySetWrite(long chipClusterPtr, DefaultClusterCallback Callback , ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet @@ -11889,7 +11889,7 @@ private native void keySetRemove(long chipClusterPtr, DefaultClusterCallback Cal , Integer groupKeySetID , @Nullable Integer timedInvokeTimeoutMs); private native void keySetReadAllIndices(long chipClusterPtr, KeySetReadAllIndicesResponseCallback Callback - , ArrayList groupKeySetIDs + , @Nullable Integer timedInvokeTimeoutMs); public interface KeySetReadResponseCallback { void onSuccess(ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet); @@ -13420,9 +13420,29 @@ public void changeToMode(DefaultClusterCallback callback , int timedInvokeTimeoutMs) { changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); } + + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode) { + changeToModeWithStatus(chipClusterPtr, callback, newMode, null); + } + + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToModeWithStatus(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } private native void changeToMode(long chipClusterPtr, DefaultClusterCallback Callback , Integer newMode , @Nullable Integer timedInvokeTimeoutMs); + private native void changeToModeWithStatus(long chipClusterPtr, ChangeToModeResponseCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeToModeResponseCallback { + void onSuccess(Integer status, Optional statusText); + + void onError(Exception error); + } + public interface StandardNamespaceAttributeCallback { void onSuccess(@Nullable Integer value); @@ -13712,18 +13732,62 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, , int minInterval, int maxInterval); } - public static class TemperatureControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 86L; + public static class LaundryWasherModeSelectCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 81L; - public TemperatureControlCluster(long devicePtr, int endpointId) { + public LaundryWasherModeSelectCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } @Override public native long initWithDevice(long devicePtr, int endpointId); - public interface SupportedTemperatureLevelsAttributeCallback { - void onSuccess( List valueList); + public void changeToMode(DefaultClusterCallback callback + , Integer newMode) { + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode(DefaultClusterCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode) { + changeToModeWithStatus(chipClusterPtr, callback, newMode, null); + } + + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToModeWithStatus(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + private native void changeToMode(long chipClusterPtr, DefaultClusterCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + private native void changeToModeWithStatus(long chipClusterPtr, ChangeToModeResponseCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeToModeResponseCallback { + void onSuccess(Integer status, Optional statusText); + + void onError(Exception error); + } + + + public interface SupportedModesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnModeAttributeCallback { + void onSuccess(@Nullable Integer value); void onError(Exception ex); default void onSubscriptionEstablished(long subscriptionId) {} } @@ -13748,76 +13812,78 @@ public interface AttributeListAttributeCallback { default void onSubscriptionEstablished(long subscriptionId) {} } - public void readTemperatureSetpointAttribute( - IntegerAttributeCallback callback + public void readDescriptionAttribute( + CharStringAttributeCallback callback ) { - readTemperatureSetpointAttribute(chipClusterPtr, callback); + readDescriptionAttribute(chipClusterPtr, callback); } - public void subscribeTemperatureSetpointAttribute( - IntegerAttributeCallback callback + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback , int minInterval, int maxInterval) { - subscribeTemperatureSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMinTemperatureAttribute( - IntegerAttributeCallback callback + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback ) { - readMinTemperatureAttribute(chipClusterPtr, callback); + readSupportedModesAttribute(chipClusterPtr, callback); } - public void subscribeMinTemperatureAttribute( - IntegerAttributeCallback callback -, + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval) { - subscribeMinTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMaxTemperatureAttribute( + public void readCurrentModeAttribute( IntegerAttributeCallback callback ) { - readMaxTemperatureAttribute(chipClusterPtr, callback); + readCurrentModeAttribute(chipClusterPtr, callback); } - public void subscribeMaxTemperatureAttribute( + public void subscribeCurrentModeAttribute( IntegerAttributeCallback callback , int minInterval, int maxInterval) { - subscribeMaxTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readStepAttribute( - IntegerAttributeCallback callback + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback ) { - readStepAttribute(chipClusterPtr, callback); + readStartUpModeAttribute(chipClusterPtr, callback); } - public void subscribeStepAttribute( - IntegerAttributeCallback callback -, - int minInterval, int maxInterval) { - subscribeStepAttribute(chipClusterPtr, callback, minInterval, maxInterval); + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, null); } - public void readCurrentTemperatureLevelIndexAttribute( - IntegerAttributeCallback callback - ) { - readCurrentTemperatureLevelIndexAttribute(chipClusterPtr, callback); + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } - public void subscribeCurrentTemperatureLevelIndexAttribute( - IntegerAttributeCallback callback -, + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval) { - subscribeCurrentTemperatureLevelIndexAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readSupportedTemperatureLevelsAttribute( - SupportedTemperatureLevelsAttributeCallback callback + public void readOnModeAttribute( + OnModeAttributeCallback callback ) { - readSupportedTemperatureLevelsAttribute(chipClusterPtr, callback); + readOnModeAttribute(chipClusterPtr, callback); } - public void subscribeSupportedTemperatureLevelsAttribute( - SupportedTemperatureLevelsAttributeCallback callback + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback , int minInterval, int maxInterval) { - subscribeSupportedTemperatureLevelsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -13892,46 +13958,43 @@ public void subscribeClusterRevisionAttribute( subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - private native void readTemperatureSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback + private native void readDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback ); - private native void subscribeTemperatureSetpointAttribute(long chipClusterPtr, - IntegerAttributeCallback callback + private native void subscribeDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback , int minInterval, int maxInterval); - private native void readMinTemperatureAttribute(long chipClusterPtr, - IntegerAttributeCallback callback + private native void readSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback ); - private native void subscribeMinTemperatureAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); + private native void subscribeSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval); - private native void readMaxTemperatureAttribute(long chipClusterPtr, + private native void readCurrentModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback ); - private native void subscribeMaxTemperatureAttribute(long chipClusterPtr, + private native void subscribeCurrentModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback , int minInterval, int maxInterval); - private native void readStepAttribute(long chipClusterPtr, - IntegerAttributeCallback callback + private native void readStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback ); - private native void subscribeStepAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); - private native void readCurrentTemperatureLevelIndexAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeCurrentTemperatureLevelIndexAttribute(long chipClusterPtr, - IntegerAttributeCallback callback -, int minInterval, int maxInterval); + private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval); - private native void readSupportedTemperatureLevelsAttribute(long chipClusterPtr, - SupportedTemperatureLevelsAttributeCallback callback + private native void readOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback ); - private native void subscribeSupportedTemperatureLevelsAttribute(long chipClusterPtr, - SupportedTemperatureLevelsAttributeCallback callback + + private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback , int minInterval, int maxInterval); private native void readGeneratedCommandListAttribute(long chipClusterPtr, @@ -13977,30 +14040,65 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, , int minInterval, int maxInterval); } - public static class RefrigeratorAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 87L; + public static class RefrigeratorAndTemperatureControlledCabinetModeSelectCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 82L; - public RefrigeratorAlarmCluster(long devicePtr, int endpointId) { + public RefrigeratorAndTemperatureControlledCabinetModeSelectCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } @Override public native long initWithDevice(long devicePtr, int endpointId); - public void reset(DefaultClusterCallback callback - , Long alarms, Optional mask) { - reset(chipClusterPtr, callback, alarms, mask, null); + public void changeToMode(DefaultClusterCallback callback + , Integer newMode) { + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode(DefaultClusterCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode) { + changeToModeWithStatus(chipClusterPtr, callback, newMode, null); } - public void reset(DefaultClusterCallback callback - , Long alarms, Optional mask + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode , int timedInvokeTimeoutMs) { - reset(chipClusterPtr, callback, alarms, mask, timedInvokeTimeoutMs); + changeToModeWithStatus(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); } - private native void reset(long chipClusterPtr, DefaultClusterCallback Callback - , Long alarms, Optional mask + private native void changeToMode(long chipClusterPtr, DefaultClusterCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + private native void changeToModeWithStatus(long chipClusterPtr, ChangeToModeResponseCallback Callback + , Integer newMode , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeToModeResponseCallback { + void onSuccess(Integer status, Optional statusText); + + void onError(Exception error); + } + + public interface SupportedModesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } public interface GeneratedCommandListAttributeCallback { void onSuccess( List valueList); void onError(Exception ex); @@ -14022,47 +14120,78 @@ public interface AttributeListAttributeCallback { default void onSubscriptionEstablished(long subscriptionId) {} } - public void readMaskAttribute( - LongAttributeCallback callback + public void readDescriptionAttribute( + CharStringAttributeCallback callback ) { - readMaskAttribute(chipClusterPtr, callback); - } - public void writeMaskAttribute(DefaultClusterCallback callback, Long value) { - writeMaskAttribute(chipClusterPtr, callback, value, null); - } - - public void writeMaskAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - writeMaskAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + readDescriptionAttribute(chipClusterPtr, callback); } - public void subscribeMaskAttribute( - LongAttributeCallback callback + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback , int minInterval, int maxInterval) { - subscribeMaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readLatchAttribute( - LongAttributeCallback callback + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback ) { - readLatchAttribute(chipClusterPtr, callback); + readSupportedModesAttribute(chipClusterPtr, callback); } - public void subscribeLatchAttribute( - LongAttributeCallback callback -, + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval) { - subscribeLatchAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readStateAttribute( - LongAttributeCallback callback + public void readCurrentModeAttribute( + IntegerAttributeCallback callback ) { - readStateAttribute(chipClusterPtr, callback); + readCurrentModeAttribute(chipClusterPtr, callback); } - public void subscribeStateAttribute( - LongAttributeCallback callback + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback , int minInterval, int maxInterval) { - subscribeStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback + ) { + readStartUpModeAttribute(chipClusterPtr, callback); + } + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnModeAttribute( + OnModeAttributeCallback callback + ) { + readOnModeAttribute(chipClusterPtr, callback); + } + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -14137,28 +14266,1672 @@ public void subscribeClusterRevisionAttribute( subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - private native void readMaskAttribute(long chipClusterPtr, - LongAttributeCallback callback + private native void readDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback ); + private native void subscribeDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); - private native void writeMaskAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeMaskAttribute(long chipClusterPtr, - LongAttributeCallback callback + private native void readSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + ); + private native void subscribeSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback , int minInterval, int maxInterval); - private native void readLatchAttribute(long chipClusterPtr, + private native void readStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + ); + + private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + ); + + private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, LongAttributeCallback callback ); - private native void subscribeLatchAttribute(long chipClusterPtr, + private native void subscribeFeatureMapAttribute(long chipClusterPtr, LongAttributeCallback callback , int minInterval, int maxInterval); - private native void readStateAttribute(long chipClusterPtr, - LongAttributeCallback callback + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback ); - private native void subscribeStateAttribute(long chipClusterPtr, - LongAttributeCallback callback + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback , int minInterval, int maxInterval); + } + + public static class WasherControlsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 83L; + + public WasherControlsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface SpinSpeedsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface SpinSpeedCurrentAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NumberOfRinsesAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readSpinSpeedsAttribute( + SpinSpeedsAttributeCallback callback + ) { + readSpinSpeedsAttribute(chipClusterPtr, callback); + } + public void subscribeSpinSpeedsAttribute( + SpinSpeedsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSpinSpeedsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSpinSpeedCurrentAttribute( + SpinSpeedCurrentAttributeCallback callback + ) { + readSpinSpeedCurrentAttribute(chipClusterPtr, callback); + } + public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value) { + writeSpinSpeedCurrentAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSpinSpeedCurrentAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeSpinSpeedCurrentAttribute( + SpinSpeedCurrentAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSpinSpeedCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfRinsesAttribute( + NumberOfRinsesAttributeCallback callback + ) { + readNumberOfRinsesAttribute(chipClusterPtr, callback); + } + public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value) { + writeNumberOfRinsesAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNumberOfRinsesAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNumberOfRinsesAttribute( + NumberOfRinsesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNumberOfRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxRinsesAttribute( + IntegerAttributeCallback callback + ) { + readMaxRinsesAttribute(chipClusterPtr, callback); + } + public void subscribeMaxRinsesAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readSpinSpeedsAttribute(long chipClusterPtr, + SpinSpeedsAttributeCallback callback + ); + private native void subscribeSpinSpeedsAttribute(long chipClusterPtr, + SpinSpeedsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSpinSpeedCurrentAttribute(long chipClusterPtr, + SpinSpeedCurrentAttributeCallback callback + ); + + private native void writeSpinSpeedCurrentAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeSpinSpeedCurrentAttribute(long chipClusterPtr, + SpinSpeedCurrentAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNumberOfRinsesAttribute(long chipClusterPtr, + NumberOfRinsesAttributeCallback callback + ); + + private native void writeNumberOfRinsesAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNumberOfRinsesAttribute(long chipClusterPtr, + NumberOfRinsesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxRinsesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMaxRinsesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class RvcRunModeSelectCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 84L; + + public RvcRunModeSelectCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void changeToMode(DefaultClusterCallback callback + , Integer newMode) { + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode(DefaultClusterCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode) { + changeToModeWithStatus(chipClusterPtr, callback, newMode, null); + } + + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToModeWithStatus(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + private native void changeToMode(long chipClusterPtr, DefaultClusterCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + private native void changeToModeWithStatus(long chipClusterPtr, ChangeToModeResponseCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeToModeResponseCallback { + void onSuccess(Integer status, Optional statusText); + + void onError(Exception error); + } + + + public interface SupportedModesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readDescriptionAttribute( + CharStringAttributeCallback callback + ) { + readDescriptionAttribute(chipClusterPtr, callback); + } + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback + ) { + readSupportedModesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentModeAttribute( + IntegerAttributeCallback callback + ) { + readCurrentModeAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback + ) { + readStartUpModeAttribute(chipClusterPtr, callback); + } + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnModeAttribute( + OnModeAttributeCallback callback + ) { + readOnModeAttribute(chipClusterPtr, callback); + } + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + ); + private native void subscribeSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + ); + + private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + ); + + private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class RvcCleanModeSelectCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 85L; + + public RvcCleanModeSelectCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void changeToMode(DefaultClusterCallback callback + , Integer newMode) { + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode(DefaultClusterCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode) { + changeToModeWithStatus(chipClusterPtr, callback, newMode, null); + } + + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToModeWithStatus(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + private native void changeToMode(long chipClusterPtr, DefaultClusterCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + private native void changeToModeWithStatus(long chipClusterPtr, ChangeToModeResponseCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeToModeResponseCallback { + void onSuccess(Integer status, Optional statusText); + + void onError(Exception error); + } + + + public interface SupportedModesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readDescriptionAttribute( + CharStringAttributeCallback callback + ) { + readDescriptionAttribute(chipClusterPtr, callback); + } + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback + ) { + readSupportedModesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentModeAttribute( + IntegerAttributeCallback callback + ) { + readCurrentModeAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback + ) { + readStartUpModeAttribute(chipClusterPtr, callback); + } + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnModeAttribute( + OnModeAttributeCallback callback + ) { + readOnModeAttribute(chipClusterPtr, callback); + } + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + ); + private native void subscribeSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + ); + + private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + ); + + private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class TemperatureControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 86L; + + public TemperatureControlCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface SupportedTemperatureLevelsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readTemperatureSetpointAttribute( + IntegerAttributeCallback callback + ) { + readTemperatureSetpointAttribute(chipClusterPtr, callback); + } + public void subscribeTemperatureSetpointAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTemperatureSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinTemperatureAttribute( + IntegerAttributeCallback callback + ) { + readMinTemperatureAttribute(chipClusterPtr, callback); + } + public void subscribeMinTemperatureAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMinTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxTemperatureAttribute( + IntegerAttributeCallback callback + ) { + readMaxTemperatureAttribute(chipClusterPtr, callback); + } + public void subscribeMaxTemperatureAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStepAttribute( + IntegerAttributeCallback callback + ) { + readStepAttribute(chipClusterPtr, callback); + } + public void subscribeStepAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStepAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSelectedTemperatureLevelAttribute( + IntegerAttributeCallback callback + ) { + readSelectedTemperatureLevelAttribute(chipClusterPtr, callback); + } + public void subscribeSelectedTemperatureLevelAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSelectedTemperatureLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedTemperatureLevelsAttribute( + SupportedTemperatureLevelsAttributeCallback callback + ) { + readSupportedTemperatureLevelsAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedTemperatureLevelsAttribute( + SupportedTemperatureLevelsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedTemperatureLevelsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readTemperatureSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeTemperatureSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMinTemperatureAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMinTemperatureAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMaxTemperatureAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMaxTemperatureAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStepAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeStepAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSelectedTemperatureLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSelectedTemperatureLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedTemperatureLevelsAttribute(long chipClusterPtr, + SupportedTemperatureLevelsAttributeCallback callback + ); + private native void subscribeSupportedTemperatureLevelsAttribute(long chipClusterPtr, + SupportedTemperatureLevelsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class RefrigeratorAlarmCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 87L; + + public RefrigeratorAlarmCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMaskAttribute( + LongAttributeCallback callback + ) { + readMaskAttribute(chipClusterPtr, callback); + } + public void subscribeMaskAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStateAttribute( + LongAttributeCallback callback + ) { + readStateAttribute(chipClusterPtr, callback); + } + public void subscribeStateAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMaskAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeMaskAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStateAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeStateAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class DishwasherModeSelectCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 89L; + + public DishwasherModeSelectCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void changeToMode(DefaultClusterCallback callback + , Integer newMode) { + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode(DefaultClusterCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode) { + changeToModeWithStatus(chipClusterPtr, callback, newMode, null); + } + + public void changeToModeWithStatus(ChangeToModeResponseCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToModeWithStatus(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + private native void changeToMode(long chipClusterPtr, DefaultClusterCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + private native void changeToModeWithStatus(long chipClusterPtr, ChangeToModeResponseCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeToModeResponseCallback { + void onSuccess(Integer status, Optional statusText); + + void onError(Exception error); + } + + + public interface SupportedModesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readDescriptionAttribute( + CharStringAttributeCallback callback + ) { + readDescriptionAttribute(chipClusterPtr, callback); + } + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback + ) { + readSupportedModesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentModeAttribute( + IntegerAttributeCallback callback + ) { + readCurrentModeAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback + ) { + readStartUpModeAttribute(chipClusterPtr, callback); + } + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnModeAttribute( + OnModeAttributeCallback callback + ) { + readOnModeAttribute(chipClusterPtr, callback); + } + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + ); + private native void subscribeSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + ); + + private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + ); + + private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + , int minInterval, int maxInterval); private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index 0a28a098b83aa9..83e7e60c2e79ea 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -150,12 +150,30 @@ public static String clusterIdToName(long clusterId) { if (clusterId == 80L) { return "ModeSelect"; } + if (clusterId == 81L) { + return "LaundryWasherModeSelect"; + } + if (clusterId == 82L) { + return "RefrigeratorAndTemperatureControlledCabinetModeSelect"; + } + if (clusterId == 83L) { + return "WasherControls"; + } + if (clusterId == 84L) { + return "RvcRunModeSelect"; + } + if (clusterId == 85L) { + return "RvcCleanModeSelect"; + } if (clusterId == 86L) { return "TemperatureControl"; } if (clusterId == 87L) { return "RefrigeratorAlarm"; } + if (clusterId == 89L) { + return "DishwasherModeSelect"; + } if (clusterId == 91L) { return "AirQuality"; } @@ -2153,6 +2171,183 @@ public static String attributeIdToName(long clusterId, long attributeId) { } return ""; } + if (clusterId == 81L) { + if (attributeId == 0L) { + return "Description"; + } + if (attributeId == 2L) { + return "SupportedModes"; + } + if (attributeId == 3L) { + return "CurrentMode"; + } + if (attributeId == 4L) { + return "StartUpMode"; + } + if (attributeId == 5L) { + return "OnMode"; + } + if (attributeId == 65528L) { + return "GeneratedCommandList"; + } + if (attributeId == 65529L) { + return "AcceptedCommandList"; + } + if (attributeId == 65530L) { + return "EventList"; + } + if (attributeId == 65531L) { + return "AttributeList"; + } + if (attributeId == 65532L) { + return "FeatureMap"; + } + if (attributeId == 65533L) { + return "ClusterRevision"; + } + return ""; + } + if (clusterId == 82L) { + if (attributeId == 0L) { + return "Description"; + } + if (attributeId == 2L) { + return "SupportedModes"; + } + if (attributeId == 3L) { + return "CurrentMode"; + } + if (attributeId == 4L) { + return "StartUpMode"; + } + if (attributeId == 5L) { + return "OnMode"; + } + if (attributeId == 65528L) { + return "GeneratedCommandList"; + } + if (attributeId == 65529L) { + return "AcceptedCommandList"; + } + if (attributeId == 65530L) { + return "EventList"; + } + if (attributeId == 65531L) { + return "AttributeList"; + } + if (attributeId == 65532L) { + return "FeatureMap"; + } + if (attributeId == 65533L) { + return "ClusterRevision"; + } + return ""; + } + if (clusterId == 83L) { + if (attributeId == 0L) { + return "SpinSpeeds"; + } + if (attributeId == 1L) { + return "SpinSpeedCurrent"; + } + if (attributeId == 2L) { + return "NumberOfRinses"; + } + if (attributeId == 3L) { + return "MaxRinses"; + } + if (attributeId == 65528L) { + return "GeneratedCommandList"; + } + if (attributeId == 65529L) { + return "AcceptedCommandList"; + } + if (attributeId == 65530L) { + return "EventList"; + } + if (attributeId == 65531L) { + return "AttributeList"; + } + if (attributeId == 65532L) { + return "FeatureMap"; + } + if (attributeId == 65533L) { + return "ClusterRevision"; + } + return ""; + } + if (clusterId == 84L) { + if (attributeId == 0L) { + return "Description"; + } + if (attributeId == 2L) { + return "SupportedModes"; + } + if (attributeId == 3L) { + return "CurrentMode"; + } + if (attributeId == 4L) { + return "StartUpMode"; + } + if (attributeId == 5L) { + return "OnMode"; + } + if (attributeId == 65528L) { + return "GeneratedCommandList"; + } + if (attributeId == 65529L) { + return "AcceptedCommandList"; + } + if (attributeId == 65530L) { + return "EventList"; + } + if (attributeId == 65531L) { + return "AttributeList"; + } + if (attributeId == 65532L) { + return "FeatureMap"; + } + if (attributeId == 65533L) { + return "ClusterRevision"; + } + return ""; + } + if (clusterId == 85L) { + if (attributeId == 0L) { + return "Description"; + } + if (attributeId == 2L) { + return "SupportedModes"; + } + if (attributeId == 3L) { + return "CurrentMode"; + } + if (attributeId == 4L) { + return "StartUpMode"; + } + if (attributeId == 5L) { + return "OnMode"; + } + if (attributeId == 65528L) { + return "GeneratedCommandList"; + } + if (attributeId == 65529L) { + return "AcceptedCommandList"; + } + if (attributeId == 65530L) { + return "EventList"; + } + if (attributeId == 65531L) { + return "AttributeList"; + } + if (attributeId == 65532L) { + return "FeatureMap"; + } + if (attributeId == 65533L) { + return "ClusterRevision"; + } + return ""; + } if (clusterId == 86L) { if (attributeId == 0L) { return "TemperatureSetpoint"; @@ -2167,7 +2362,7 @@ public static String attributeIdToName(long clusterId, long attributeId) { return "Step"; } if (attributeId == 4L) { - return "CurrentTemperatureLevelIndex"; + return "SelectedTemperatureLevel"; } if (attributeId == 5L) { return "SupportedTemperatureLevels"; @@ -2196,9 +2391,6 @@ public static String attributeIdToName(long clusterId, long attributeId) { if (attributeId == 0L) { return "Mask"; } - if (attributeId == 1L) { - return "Latch"; - } if (attributeId == 2L) { return "State"; } @@ -2222,6 +2414,42 @@ public static String attributeIdToName(long clusterId, long attributeId) { } return ""; } + if (clusterId == 89L) { + if (attributeId == 0L) { + return "Description"; + } + if (attributeId == 2L) { + return "SupportedModes"; + } + if (attributeId == 3L) { + return "CurrentMode"; + } + if (attributeId == 4L) { + return "StartUpMode"; + } + if (attributeId == 5L) { + return "OnMode"; + } + if (attributeId == 65528L) { + return "GeneratedCommandList"; + } + if (attributeId == 65529L) { + return "AcceptedCommandList"; + } + if (attributeId == 65530L) { + return "EventList"; + } + if (attributeId == 65531L) { + return "AttributeList"; + } + if (attributeId == 65532L) { + return "FeatureMap"; + } + if (attributeId == 65533L) { + return "ClusterRevision"; + } + return ""; + } if (clusterId == 91L) { if (attributeId == 0L) { return "AirQuality"; @@ -7063,6 +7291,21 @@ public static String eventIdToName(long clusterId, long eventId) { if (clusterId == 80L) { return ""; } + if (clusterId == 81L) { + return ""; + } + if (clusterId == 82L) { + return ""; + } + if (clusterId == 83L) { + return ""; + } + if (clusterId == 84L) { + return ""; + } + if (clusterId == 85L) { + return ""; + } if (clusterId == 86L) { return ""; } @@ -7072,6 +7315,9 @@ public static String eventIdToName(long clusterId, long eventId) { } return ""; } + if (clusterId == 89L) { + return ""; + } if (clusterId == 91L) { return ""; } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index 98f6168c19e60c..b5294f94e6054b 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -1542,28 +1542,34 @@ public String toString() { } } -public static class ModeSelectClusterSemanticTagStruct { -public Integer mfgCode; +public static class ModeSelectClusterModeTagStruct { +public Optional mfgCode; public Integer value; +public Optional tagName; - public ModeSelectClusterSemanticTagStruct( - Integer mfgCode + public ModeSelectClusterModeTagStruct( + Optional mfgCode , Integer value + , Optional tagName ) { this.mfgCode = mfgCode; this.value = value; + this.tagName = tagName; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ModeSelectClusterSemanticTagStruct {\n"); + output.append("ModeSelectClusterModeTagStruct {\n"); output.append("\tmfgCode: "); output.append(mfgCode); output.append("\n"); output.append("\tvalue: "); output.append(value); output.append("\n"); + output.append("\ttagName: "); + output.append(tagName); + output.append("\n"); output.append("}\n"); return output.toString(); } @@ -1572,16 +1578,16 @@ public String toString() { public static class ModeSelectClusterModeOptionStruct { public String label; public Integer mode; -public ArrayList semanticTags; +public ArrayList modeTags; public ModeSelectClusterModeOptionStruct( String label , Integer mode - , ArrayList semanticTags + , ArrayList modeTags ) { this.label = label; this.mode = mode; - this.semanticTags = semanticTags; + this.modeTags = modeTags; } @Override @@ -1594,36 +1600,339 @@ public String toString() { output.append("\tmode: "); output.append(mode); output.append("\n"); - output.append("\tsemanticTags: "); - output.append(semanticTags); + output.append("\tmodeTags: "); + output.append(modeTags); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} + +public static class LaundryWasherModeSelectClusterModeTagStruct { +public Optional mfgCode; +public Integer value; +public Optional tagName; + + public LaundryWasherModeSelectClusterModeTagStruct( + Optional mfgCode + , Integer value + , Optional tagName + ) { + this.mfgCode = mfgCode; + this.value = value; + this.tagName = tagName; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("LaundryWasherModeSelectClusterModeTagStruct {\n"); + output.append("\tmfgCode: "); + output.append(mfgCode); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("\ttagName: "); + output.append(tagName); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} + +public static class LaundryWasherModeSelectClusterModeOptionStruct { +public String label; +public Integer mode; +public ArrayList modeTags; + + public LaundryWasherModeSelectClusterModeOptionStruct( + String label + , Integer mode + , ArrayList modeTags + ) { + this.label = label; + this.mode = mode; + this.modeTags = modeTags; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("LaundryWasherModeSelectClusterModeOptionStruct {\n"); + output.append("\tlabel: "); + output.append(label); + output.append("\n"); + output.append("\tmode: "); + output.append(mode); + output.append("\n"); + output.append("\tmodeTags: "); + output.append(modeTags); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} + +public static class RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeTagStruct { +public Optional mfgCode; +public Integer value; +public Optional tagName; + + public RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeTagStruct( + Optional mfgCode + , Integer value + , Optional tagName + ) { + this.mfgCode = mfgCode; + this.value = value; + this.tagName = tagName; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeTagStruct {\n"); + output.append("\tmfgCode: "); + output.append(mfgCode); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("\ttagName: "); + output.append(tagName); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} + +public static class RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeOptionStruct { +public String label; +public Integer mode; +public ArrayList modeTags; + + public RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeOptionStruct( + String label + , Integer mode + , ArrayList modeTags + ) { + this.label = label; + this.mode = mode; + this.modeTags = modeTags; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("RefrigeratorAndTemperatureControlledCabinetModeSelectClusterModeOptionStruct {\n"); + output.append("\tlabel: "); + output.append(label); + output.append("\n"); + output.append("\tmode: "); + output.append(mode); + output.append("\n"); + output.append("\tmodeTags: "); + output.append(modeTags); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} + +public static class RvcRunModeSelectClusterModeTagStruct { +public Optional mfgCode; +public Integer value; +public Optional tagName; + + public RvcRunModeSelectClusterModeTagStruct( + Optional mfgCode + , Integer value + , Optional tagName + ) { + this.mfgCode = mfgCode; + this.value = value; + this.tagName = tagName; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("RvcRunModeSelectClusterModeTagStruct {\n"); + output.append("\tmfgCode: "); + output.append(mfgCode); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("\ttagName: "); + output.append(tagName); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} + +public static class RvcRunModeSelectClusterModeOptionStruct { +public String label; +public Integer mode; +public ArrayList modeTags; + + public RvcRunModeSelectClusterModeOptionStruct( + String label + , Integer mode + , ArrayList modeTags + ) { + this.label = label; + this.mode = mode; + this.modeTags = modeTags; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("RvcRunModeSelectClusterModeOptionStruct {\n"); + output.append("\tlabel: "); + output.append(label); + output.append("\n"); + output.append("\tmode: "); + output.append(mode); + output.append("\n"); + output.append("\tmodeTags: "); + output.append(modeTags); output.append("\n"); output.append("}\n"); return output.toString(); } } -public static class TemperatureControlClusterTemperatureLevelStruct { +public static class RvcCleanModeSelectClusterModeTagStruct { +public Optional mfgCode; +public Integer value; +public Optional tagName; + + public RvcCleanModeSelectClusterModeTagStruct( + Optional mfgCode + , Integer value + , Optional tagName + ) { + this.mfgCode = mfgCode; + this.value = value; + this.tagName = tagName; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("RvcCleanModeSelectClusterModeTagStruct {\n"); + output.append("\tmfgCode: "); + output.append(mfgCode); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("\ttagName: "); + output.append(tagName); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} + +public static class RvcCleanModeSelectClusterModeOptionStruct { public String label; -public Integer temperatureLevel; +public Integer mode; +public ArrayList modeTags; - public TemperatureControlClusterTemperatureLevelStruct( + public RvcCleanModeSelectClusterModeOptionStruct( String label - , Integer temperatureLevel + , Integer mode + , ArrayList modeTags ) { this.label = label; - this.temperatureLevel = temperatureLevel; + this.mode = mode; + this.modeTags = modeTags; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("TemperatureControlClusterTemperatureLevelStruct {\n"); + output.append("RvcCleanModeSelectClusterModeOptionStruct {\n"); output.append("\tlabel: "); output.append(label); output.append("\n"); - output.append("\ttemperatureLevel: "); - output.append(temperatureLevel); + output.append("\tmode: "); + output.append(mode); + output.append("\n"); + output.append("\tmodeTags: "); + output.append(modeTags); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} + +public static class DishwasherModeSelectClusterModeTagStruct { +public Optional mfgCode; +public Integer value; +public Optional tagName; + + public DishwasherModeSelectClusterModeTagStruct( + Optional mfgCode + , Integer value + , Optional tagName + ) { + this.mfgCode = mfgCode; + this.value = value; + this.tagName = tagName; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DishwasherModeSelectClusterModeTagStruct {\n"); + output.append("\tmfgCode: "); + output.append(mfgCode); output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("\ttagName: "); + output.append(tagName); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} + +public static class DishwasherModeSelectClusterModeOptionStruct { +public String label; +public Integer mode; +public ArrayList modeTags; + + public DishwasherModeSelectClusterModeOptionStruct( + String label + , Integer mode + , ArrayList modeTags + ) { + this.label = label; + this.mode = mode; + this.modeTags = modeTags; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DishwasherModeSelectClusterModeOptionStruct {\n"); + output.append("\tlabel: "); + output.append(label); + output.append("\n"); + output.append("\tmode: "); + output.append(mode); + output.append("\n"); + output.append("\tmodeTags: "); + output.append(modeTags); + output.append("\n"); output.append("}\n"); return output.toString(); } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index e3215b76b98fd4..92f7fa0d6f7645 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -5757,6 +5757,29 @@ public void onError(Exception ex) { } } + public static class DelegatedModeSelectClusterChangeToModeResponseCallback implements ChipClusters.ModeSelectCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer Status, Optional StatusText) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo StatusResponseValue = new CommandResponseInfo("Status", "Integer"); + responseValues.put(StatusResponseValue, Status); + CommandResponseInfo StatusTextResponseValue = new CommandResponseInfo("StatusText", "Optional"); + responseValues.put(StatusTextResponseValue, StatusText); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedModeSelectClusterStandardNamespaceAttributeCallback implements ChipClusters.ModeSelectCluster.StandardNamespaceAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -5776,7 +5799,769 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.ModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.ModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedModeSelectClusterStartUpModeAttributeCallback implements ChipClusters.ModeSelectCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedModeSelectClusterOnModeAttributeCallback implements ChipClusters.ModeSelectCluster.OnModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedModeSelectClusterGeneratedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedModeSelectClusterAcceptedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedModeSelectClusterEventListAttributeCallback implements ChipClusters.ModeSelectCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedModeSelectClusterAttributeListAttributeCallback implements ChipClusters.ModeSelectCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedLaundryWasherModeSelectClusterChangeToModeResponseCallback implements ChipClusters.LaundryWasherModeSelectCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer Status, Optional StatusText) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo StatusResponseValue = new CommandResponseInfo("Status", "Integer"); + responseValues.put(StatusResponseValue, Status); + CommandResponseInfo StatusTextResponseValue = new CommandResponseInfo("StatusText", "Optional"); + responseValues.put(StatusTextResponseValue, StatusText); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedLaundryWasherModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.LaundryWasherModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedLaundryWasherModeSelectClusterStartUpModeAttributeCallback implements ChipClusters.LaundryWasherModeSelectCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedLaundryWasherModeSelectClusterOnModeAttributeCallback implements ChipClusters.LaundryWasherModeSelectCluster.OnModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedLaundryWasherModeSelectClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherModeSelectCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedLaundryWasherModeSelectClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryWasherModeSelectCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedLaundryWasherModeSelectClusterEventListAttributeCallback implements ChipClusters.LaundryWasherModeSelectCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedLaundryWasherModeSelectClusterAttributeListAttributeCallback implements ChipClusters.LaundryWasherModeSelectCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeResponseCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer Status, Optional StatusText) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo StatusResponseValue = new CommandResponseInfo("Status", "Integer"); + responseValues.put(StatusResponseValue, Status); + CommandResponseInfo StatusTextResponseValue = new CommandResponseInfo("StatusText", "Optional"); + responseValues.put(StatusTextResponseValue, StatusText); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterStartUpModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterOnModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.OnModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterGeneratedCommandListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterAcceptedCommandListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterEventListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterAttributeListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedWasherControlsClusterSpinSpeedsAttributeCallback implements ChipClusters.WasherControlsCluster.SpinSpeedsAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedWasherControlsClusterSpinSpeedCurrentAttributeCallback implements ChipClusters.WasherControlsCluster.SpinSpeedCurrentAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedWasherControlsClusterNumberOfRinsesAttributeCallback implements ChipClusters.WasherControlsCluster.NumberOfRinsesAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedWasherControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.WasherControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedWasherControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.WasherControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedWasherControlsClusterEventListAttributeCallback implements ChipClusters.WasherControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedWasherControlsClusterAttributeListAttributeCallback implements ChipClusters.WasherControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRvcRunModeSelectClusterChangeToModeResponseCallback implements ChipClusters.RvcRunModeSelectCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer Status, Optional StatusText) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo StatusResponseValue = new CommandResponseInfo("Status", "Integer"); + responseValues.put(StatusResponseValue, Status); + CommandResponseInfo StatusTextResponseValue = new CommandResponseInfo("StatusText", "Optional"); + responseValues.put(StatusTextResponseValue, StatusText); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedRvcRunModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.RvcRunModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRvcRunModeSelectClusterStartUpModeAttributeCallback implements ChipClusters.RvcRunModeSelectCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRvcRunModeSelectClusterOnModeAttributeCallback implements ChipClusters.RvcRunModeSelectCluster.OnModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRvcRunModeSelectClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcRunModeSelectCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRvcRunModeSelectClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcRunModeSelectCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRvcRunModeSelectClusterEventListAttributeCallback implements ChipClusters.RvcRunModeSelectCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRvcRunModeSelectClusterAttributeListAttributeCallback implements ChipClusters.RvcRunModeSelectCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRvcCleanModeSelectClusterChangeToModeResponseCallback implements ChipClusters.RvcCleanModeSelectCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer Status, Optional StatusText) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo StatusResponseValue = new CommandResponseInfo("Status", "Integer"); + responseValues.put(StatusResponseValue, Status); + CommandResponseInfo StatusTextResponseValue = new CommandResponseInfo("StatusText", "Optional"); + responseValues.put(StatusTextResponseValue, StatusText); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedRvcCleanModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.RvcCleanModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5784,9 +6569,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( List valueList) { + public void onSuccess( List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5795,7 +6580,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedModeSelectClusterStartUpModeAttributeCallback implements ChipClusters.ModeSelectCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeSelectClusterStartUpModeAttributeCallback implements ChipClusters.RvcCleanModeSelectCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5814,7 +6599,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedModeSelectClusterOnModeAttributeCallback implements ChipClusters.ModeSelectCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeSelectClusterOnModeAttributeCallback implements ChipClusters.RvcCleanModeSelectCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5833,7 +6618,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedModeSelectClusterGeneratedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeSelectClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcCleanModeSelectCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5852,7 +6637,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedModeSelectClusterAcceptedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeSelectClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcCleanModeSelectCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5871,7 +6656,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedModeSelectClusterEventListAttributeCallback implements ChipClusters.ModeSelectCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeSelectClusterEventListAttributeCallback implements ChipClusters.RvcCleanModeSelectCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5890,7 +6675,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedModeSelectClusterAttributeListAttributeCallback implements ChipClusters.ModeSelectCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeSelectClusterAttributeListAttributeCallback implements ChipClusters.RvcCleanModeSelectCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5918,9 +6703,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( List valueList) { + public void onSuccess( List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6070,6 +6855,163 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { this.callback = callback; } +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedDishwasherModeSelectClusterChangeToModeResponseCallback implements ChipClusters.DishwasherModeSelectCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer Status, Optional StatusText) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo StatusResponseValue = new CommandResponseInfo("Status", "Integer"); + responseValues.put(StatusResponseValue, Status); + CommandResponseInfo StatusTextResponseValue = new CommandResponseInfo("StatusText", "Optional"); + responseValues.put(StatusTextResponseValue, StatusText); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedDishwasherModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.DishwasherModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedDishwasherModeSelectClusterStartUpModeAttributeCallback implements ChipClusters.DishwasherModeSelectCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedDishwasherModeSelectClusterOnModeAttributeCallback implements ChipClusters.DishwasherModeSelectCluster.OnModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedDishwasherModeSelectClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherModeSelectCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedDishwasherModeSelectClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherModeSelectCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedDishwasherModeSelectClusterEventListAttributeCallback implements ChipClusters.DishwasherModeSelectCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedDishwasherModeSelectClusterAttributeListAttributeCallback implements ChipClusters.DishwasherModeSelectCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + @Override public void onSuccess( List valueList) { Map responseValues = new LinkedHashMap<>(); @@ -18877,12 +19819,30 @@ public Map initializeClusterMap() { ClusterInfo modeSelectClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.ModeSelectCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("modeSelect", modeSelectClusterInfo); + ClusterInfo laundryWasherModeSelectClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.LaundryWasherModeSelectCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("laundryWasherModeSelect", laundryWasherModeSelectClusterInfo); + ClusterInfo refrigeratorAndTemperatureControlledCabinetModeSelectClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("refrigeratorAndTemperatureControlledCabinetModeSelect", refrigeratorAndTemperatureControlledCabinetModeSelectClusterInfo); + ClusterInfo washerControlsClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.WasherControlsCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("washerControls", washerControlsClusterInfo); + ClusterInfo rvcRunModeSelectClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.RvcRunModeSelectCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("rvcRunModeSelect", rvcRunModeSelectClusterInfo); + ClusterInfo rvcCleanModeSelectClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.RvcCleanModeSelectCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("rvcCleanModeSelect", rvcCleanModeSelectClusterInfo); ClusterInfo temperatureControlClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.TemperatureControlCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("temperatureControl", temperatureControlClusterInfo); ClusterInfo refrigeratorAlarmClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.RefrigeratorAlarmCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("refrigeratorAlarm", refrigeratorAlarmClusterInfo); + ClusterInfo dishwasherModeSelectClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.DishwasherModeSelectCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("dishwasherModeSelect", dishwasherModeSelectClusterInfo); ClusterInfo airQualityClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.AirQualityCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("airQuality", airQualityClusterInfo); @@ -19172,8 +20132,14 @@ public void combineCommand(Map destination, Map> getCommandMap() { ); groupKeyManagementClusterInteractionInfoMap.put("keySetRemove", groupKeyManagementkeySetRemoveInteractionInfo); Map groupKeyManagementkeySetReadAllIndicesCommandParams = new LinkedHashMap(); - CommandParameterInfo groupKeyManagementkeySetReadAllIndicesgroupKeySetIDsCommandParameterInfo = new CommandParameterInfo("groupKeySetIDs", ArrayList.class, Integer.class); - groupKeyManagementkeySetReadAllIndicesCommandParams.put("groupKeySetIDs",groupKeyManagementkeySetReadAllIndicesgroupKeySetIDsCommandParameterInfo); - InteractionInfo groupKeyManagementkeySetReadAllIndicesInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.GroupKeyManagementCluster) cluster) .keySetReadAllIndices((ChipClusters.GroupKeyManagementCluster.KeySetReadAllIndicesResponseCallback) callback - , (ArrayList) - commandArguments.get("groupKeySetIDs") ); }, @@ -21181,33 +22142,210 @@ public Map> getCommandMap() { modeSelectchangeToModeCommandParams ); modeSelectClusterInteractionInfoMap.put("changeToMode", modeSelectchangeToModeInteractionInfo); + Map modeSelectchangeToModeWithStatusCommandParams = new LinkedHashMap(); + CommandParameterInfo modeSelectchangeToModeWithStatusnewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + modeSelectchangeToModeWithStatusCommandParams.put("newMode",modeSelectchangeToModeWithStatusnewModeCommandParameterInfo); + + InteractionInfo modeSelectchangeToModeWithStatusInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ModeSelectCluster) cluster) + .changeToModeWithStatus((ChipClusters.ModeSelectCluster.ChangeToModeResponseCallback) callback + , (Integer) + commandArguments.get("newMode") + + ); + }, + () -> new DelegatedModeSelectClusterChangeToModeResponseCallback(), + modeSelectchangeToModeWithStatusCommandParams + ); + modeSelectClusterInteractionInfoMap.put("changeToModeWithStatus", modeSelectchangeToModeWithStatusInteractionInfo); commandMap.put("modeSelect", modeSelectClusterInteractionInfoMap); + Map laundryWasherModeSelectClusterInteractionInfoMap = new LinkedHashMap<>(); + Map laundryWasherModeSelectchangeToModeCommandParams = new LinkedHashMap(); + CommandParameterInfo laundryWasherModeSelectchangeToModenewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + laundryWasherModeSelectchangeToModeCommandParams.put("newMode",laundryWasherModeSelectchangeToModenewModeCommandParameterInfo); + + InteractionInfo laundryWasherModeSelectchangeToModeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster) + .changeToMode((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("newMode") + + ); + }, + () -> new DelegatedDefaultClusterCallback(), + laundryWasherModeSelectchangeToModeCommandParams + ); + laundryWasherModeSelectClusterInteractionInfoMap.put("changeToMode", laundryWasherModeSelectchangeToModeInteractionInfo); + Map laundryWasherModeSelectchangeToModeWithStatusCommandParams = new LinkedHashMap(); + CommandParameterInfo laundryWasherModeSelectchangeToModeWithStatusnewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + laundryWasherModeSelectchangeToModeWithStatusCommandParams.put("newMode",laundryWasherModeSelectchangeToModeWithStatusnewModeCommandParameterInfo); + + InteractionInfo laundryWasherModeSelectchangeToModeWithStatusInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryWasherModeSelectCluster) cluster) + .changeToModeWithStatus((ChipClusters.LaundryWasherModeSelectCluster.ChangeToModeResponseCallback) callback + , (Integer) + commandArguments.get("newMode") + + ); + }, + () -> new DelegatedLaundryWasherModeSelectClusterChangeToModeResponseCallback(), + laundryWasherModeSelectchangeToModeWithStatusCommandParams + ); + laundryWasherModeSelectClusterInteractionInfoMap.put("changeToModeWithStatus", laundryWasherModeSelectchangeToModeWithStatusInteractionInfo); + commandMap.put("laundryWasherModeSelect", laundryWasherModeSelectClusterInteractionInfoMap); + Map refrigeratorAndTemperatureControlledCabinetModeSelectClusterInteractionInfoMap = new LinkedHashMap<>(); + Map refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeCommandParams = new LinkedHashMap(); + CommandParameterInfo refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModenewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeCommandParams.put("newMode",refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModenewModeCommandParameterInfo); + + InteractionInfo refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster) + .changeToMode((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("newMode") + + ); + }, + () -> new DelegatedDefaultClusterCallback(), + refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeCommandParams + ); + refrigeratorAndTemperatureControlledCabinetModeSelectClusterInteractionInfoMap.put("changeToMode", refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeInteractionInfo); + Map refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeWithStatusCommandParams = new LinkedHashMap(); + CommandParameterInfo refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeWithStatusnewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeWithStatusCommandParams.put("newMode",refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeWithStatusnewModeCommandParameterInfo); + + InteractionInfo refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeWithStatusInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster) cluster) + .changeToModeWithStatus((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeSelectCluster.ChangeToModeResponseCallback) callback + , (Integer) + commandArguments.get("newMode") + + ); + }, + () -> new DelegatedRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeResponseCallback(), + refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeWithStatusCommandParams + ); + refrigeratorAndTemperatureControlledCabinetModeSelectClusterInteractionInfoMap.put("changeToModeWithStatus", refrigeratorAndTemperatureControlledCabinetModeSelectchangeToModeWithStatusInteractionInfo); + commandMap.put("refrigeratorAndTemperatureControlledCabinetModeSelect", refrigeratorAndTemperatureControlledCabinetModeSelectClusterInteractionInfoMap); + Map washerControlsClusterInteractionInfoMap = new LinkedHashMap<>(); + commandMap.put("washerControls", washerControlsClusterInteractionInfoMap); + Map rvcRunModeSelectClusterInteractionInfoMap = new LinkedHashMap<>(); + Map rvcRunModeSelectchangeToModeCommandParams = new LinkedHashMap(); + CommandParameterInfo rvcRunModeSelectchangeToModenewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + rvcRunModeSelectchangeToModeCommandParams.put("newMode",rvcRunModeSelectchangeToModenewModeCommandParameterInfo); + + InteractionInfo rvcRunModeSelectchangeToModeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster) + .changeToMode((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("newMode") + + ); + }, + () -> new DelegatedDefaultClusterCallback(), + rvcRunModeSelectchangeToModeCommandParams + ); + rvcRunModeSelectClusterInteractionInfoMap.put("changeToMode", rvcRunModeSelectchangeToModeInteractionInfo); + Map rvcRunModeSelectchangeToModeWithStatusCommandParams = new LinkedHashMap(); + CommandParameterInfo rvcRunModeSelectchangeToModeWithStatusnewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + rvcRunModeSelectchangeToModeWithStatusCommandParams.put("newMode",rvcRunModeSelectchangeToModeWithStatusnewModeCommandParameterInfo); + + InteractionInfo rvcRunModeSelectchangeToModeWithStatusInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcRunModeSelectCluster) cluster) + .changeToModeWithStatus((ChipClusters.RvcRunModeSelectCluster.ChangeToModeResponseCallback) callback + , (Integer) + commandArguments.get("newMode") + + ); + }, + () -> new DelegatedRvcRunModeSelectClusterChangeToModeResponseCallback(), + rvcRunModeSelectchangeToModeWithStatusCommandParams + ); + rvcRunModeSelectClusterInteractionInfoMap.put("changeToModeWithStatus", rvcRunModeSelectchangeToModeWithStatusInteractionInfo); + commandMap.put("rvcRunModeSelect", rvcRunModeSelectClusterInteractionInfoMap); + Map rvcCleanModeSelectClusterInteractionInfoMap = new LinkedHashMap<>(); + Map rvcCleanModeSelectchangeToModeCommandParams = new LinkedHashMap(); + CommandParameterInfo rvcCleanModeSelectchangeToModenewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + rvcCleanModeSelectchangeToModeCommandParams.put("newMode",rvcCleanModeSelectchangeToModenewModeCommandParameterInfo); + + InteractionInfo rvcCleanModeSelectchangeToModeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster) + .changeToMode((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("newMode") + + ); + }, + () -> new DelegatedDefaultClusterCallback(), + rvcCleanModeSelectchangeToModeCommandParams + ); + rvcCleanModeSelectClusterInteractionInfoMap.put("changeToMode", rvcCleanModeSelectchangeToModeInteractionInfo); + Map rvcCleanModeSelectchangeToModeWithStatusCommandParams = new LinkedHashMap(); + CommandParameterInfo rvcCleanModeSelectchangeToModeWithStatusnewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + rvcCleanModeSelectchangeToModeWithStatusCommandParams.put("newMode",rvcCleanModeSelectchangeToModeWithStatusnewModeCommandParameterInfo); + + InteractionInfo rvcCleanModeSelectchangeToModeWithStatusInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcCleanModeSelectCluster) cluster) + .changeToModeWithStatus((ChipClusters.RvcCleanModeSelectCluster.ChangeToModeResponseCallback) callback + , (Integer) + commandArguments.get("newMode") + + ); + }, + () -> new DelegatedRvcCleanModeSelectClusterChangeToModeResponseCallback(), + rvcCleanModeSelectchangeToModeWithStatusCommandParams + ); + rvcCleanModeSelectClusterInteractionInfoMap.put("changeToModeWithStatus", rvcCleanModeSelectchangeToModeWithStatusInteractionInfo); + commandMap.put("rvcCleanModeSelect", rvcCleanModeSelectClusterInteractionInfoMap); Map temperatureControlClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("temperatureControl", temperatureControlClusterInteractionInfoMap); Map refrigeratorAlarmClusterInteractionInfoMap = new LinkedHashMap<>(); - Map refrigeratorAlarmresetCommandParams = new LinkedHashMap(); - CommandParameterInfo refrigeratorAlarmresetalarmsCommandParameterInfo = new CommandParameterInfo("alarms", Long.class, Long.class); - refrigeratorAlarmresetCommandParams.put("alarms",refrigeratorAlarmresetalarmsCommandParameterInfo); - - CommandParameterInfo refrigeratorAlarmresetmaskCommandParameterInfo = new CommandParameterInfo("mask", Optional.class, Long.class); - refrigeratorAlarmresetCommandParams.put("mask",refrigeratorAlarmresetmaskCommandParameterInfo); + commandMap.put("refrigeratorAlarm", refrigeratorAlarmClusterInteractionInfoMap); + Map dishwasherModeSelectClusterInteractionInfoMap = new LinkedHashMap<>(); + Map dishwasherModeSelectchangeToModeCommandParams = new LinkedHashMap(); + CommandParameterInfo dishwasherModeSelectchangeToModenewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + dishwasherModeSelectchangeToModeCommandParams.put("newMode",dishwasherModeSelectchangeToModenewModeCommandParameterInfo); - InteractionInfo refrigeratorAlarmresetInteractionInfo = new InteractionInfo( + InteractionInfo dishwasherModeSelectchangeToModeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.RefrigeratorAlarmCluster) cluster) - .reset((DefaultClusterCallback) callback - , (Long) - commandArguments.get("alarms") - , (Optional) - commandArguments.get("mask") + ((ChipClusters.DishwasherModeSelectCluster) cluster) + .changeToMode((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("newMode") ); }, () -> new DelegatedDefaultClusterCallback(), - refrigeratorAlarmresetCommandParams + dishwasherModeSelectchangeToModeCommandParams ); - refrigeratorAlarmClusterInteractionInfoMap.put("reset", refrigeratorAlarmresetInteractionInfo); - commandMap.put("refrigeratorAlarm", refrigeratorAlarmClusterInteractionInfoMap); + dishwasherModeSelectClusterInteractionInfoMap.put("changeToMode", dishwasherModeSelectchangeToModeInteractionInfo); + Map dishwasherModeSelectchangeToModeWithStatusCommandParams = new LinkedHashMap(); + CommandParameterInfo dishwasherModeSelectchangeToModeWithStatusnewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + dishwasherModeSelectchangeToModeWithStatusCommandParams.put("newMode",dishwasherModeSelectchangeToModeWithStatusnewModeCommandParameterInfo); + + InteractionInfo dishwasherModeSelectchangeToModeWithStatusInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherModeSelectCluster) cluster) + .changeToModeWithStatus((ChipClusters.DishwasherModeSelectCluster.ChangeToModeResponseCallback) callback + , (Integer) + commandArguments.get("newMode") + + ); + }, + () -> new DelegatedDishwasherModeSelectClusterChangeToModeResponseCallback(), + dishwasherModeSelectchangeToModeWithStatusCommandParams + ); + dishwasherModeSelectClusterInteractionInfoMap.put("changeToModeWithStatus", dishwasherModeSelectchangeToModeWithStatusInteractionInfo); + commandMap.put("dishwasherModeSelect", dishwasherModeSelectClusterInteractionInfoMap); Map airQualityClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("airQuality", airQualityClusterInteractionInfoMap); Map smokeCoAlarmClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index a4de95a1c18d49..1ab9d1423c7557 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -506,7 +506,7 @@ def OverrideLivenessTimeoutMs(self, timeoutMs: int): def GetReportingIntervalsSeconds(self) -> Tuple[int, int]: ''' - Retrieve the reporting intervals associated with an active subscription. + Retrieve the reporting intervals associated with an active subscription. This should only be called if we're of subscription interaction type and after a subscription has been established. ''' handle = chip.native.GetLibraryHandle() @@ -651,8 +651,9 @@ def _BuildEventIndex(): class AsyncReadTransaction: @dataclass class ReadResponse: - attributes: AttributeCache = None - events: List[ClusterEvent] = None + attributes: dict[Any, Any] + events: list[ClusterEvent] + tlvAttributes: dict[int, Any] def __init__(self, future: Future, eventLoop, devCtrl, returnClusterObject: bool): self._event_loop = eventLoop @@ -797,7 +798,7 @@ def _handleDone(self): self._future.set_exception(chip.exceptions.ChipStackError(self._resultError)) else: self._future.set_result(AsyncReadTransaction.ReadResponse( - attributes=self._cache.attributeCache, events=self._events)) + attributes=self._cache.attributeCache, events=self._events, tlvAttributes=self._cache.attributeTLVCache)) # # Decrement the ref on ourselves to match the increment that happened at allocation. diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 06c25900a89a2f..d65219839e0887 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3814,7 +3814,6 @@ class ChipClusters: "commandId": 0x00000004, "commandName": "KeySetReadAllIndices", "args": { - "groupKeySetIDs": "int", }, }, }, @@ -4280,6 +4279,13 @@ class ChipClusters: "newMode": "int", }, }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "ChangeToModeWithStatus", + "args": { + "newMode": "int", + }, + }, }, "attributes": { 0x00000000: { @@ -4358,6 +4364,436 @@ class ChipClusters: }, }, } + _LAUNDRY_WASHER_MODE_SELECT_CLUSTER_INFO = { + "clusterName": "LaundryWasherModeSelect", + "clusterId": 0x00000051, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "ChangeToMode", + "args": { + "newMode": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "ChangeToModeWithStatus", + "args": { + "newMode": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "Description", + "attributeId": 0x00000000, + "type": "str", + "reportable": True, + }, + 0x00000002: { + "attributeName": "SupportedModes", + "attributeId": 0x00000002, + "type": "", + "reportable": True, + }, + 0x00000003: { + "attributeName": "CurrentMode", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000004: { + "attributeName": "StartUpMode", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000005: { + "attributeName": "OnMode", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER_INFO = { + "clusterName": "RefrigeratorAndTemperatureControlledCabinetModeSelect", + "clusterId": 0x00000052, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "ChangeToMode", + "args": { + "newMode": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "ChangeToModeWithStatus", + "args": { + "newMode": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "Description", + "attributeId": 0x00000000, + "type": "str", + "reportable": True, + }, + 0x00000002: { + "attributeName": "SupportedModes", + "attributeId": 0x00000002, + "type": "", + "reportable": True, + }, + 0x00000003: { + "attributeName": "CurrentMode", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000004: { + "attributeName": "StartUpMode", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000005: { + "attributeName": "OnMode", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _WASHER_CONTROLS_CLUSTER_INFO = { + "clusterName": "WasherControls", + "clusterId": 0x00000053, + "commands": { + }, + "attributes": { + 0x00000000: { + "attributeName": "SpinSpeeds", + "attributeId": 0x00000000, + "type": "str", + "reportable": True, + }, + 0x00000001: { + "attributeName": "SpinSpeedCurrent", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000002: { + "attributeName": "NumberOfRinses", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000003: { + "attributeName": "MaxRinses", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _RVC_RUN_MODE_SELECT_CLUSTER_INFO = { + "clusterName": "RvcRunModeSelect", + "clusterId": 0x00000054, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "ChangeToMode", + "args": { + "newMode": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "ChangeToModeWithStatus", + "args": { + "newMode": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "Description", + "attributeId": 0x00000000, + "type": "str", + "reportable": True, + }, + 0x00000002: { + "attributeName": "SupportedModes", + "attributeId": 0x00000002, + "type": "", + "reportable": True, + }, + 0x00000003: { + "attributeName": "CurrentMode", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000004: { + "attributeName": "StartUpMode", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000005: { + "attributeName": "OnMode", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _RVC_CLEAN_MODE_SELECT_CLUSTER_INFO = { + "clusterName": "RvcCleanModeSelect", + "clusterId": 0x00000055, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "ChangeToMode", + "args": { + "newMode": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "ChangeToModeWithStatus", + "args": { + "newMode": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "Description", + "attributeId": 0x00000000, + "type": "str", + "reportable": True, + }, + 0x00000002: { + "attributeName": "SupportedModes", + "attributeId": 0x00000002, + "type": "", + "reportable": True, + }, + 0x00000003: { + "attributeName": "CurrentMode", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000004: { + "attributeName": "StartUpMode", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000005: { + "attributeName": "OnMode", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } _TEMPERATURE_CONTROL_CLUSTER_INFO = { "clusterName": "TemperatureControl", "clusterId": 0x00000056, @@ -4397,7 +4833,7 @@ class ChipClusters: "reportable": True, }, 0x00000004: { - "attributeName": "CurrentTemperatureLevelIndex", + "attributeName": "SelectedTemperatureLevel", "attributeId": 0x00000004, "type": "int", "reportable": True, @@ -4405,7 +4841,7 @@ class ChipClusters: 0x00000005: { "attributeName": "SupportedTemperatureLevels", "attributeId": 0x00000005, - "type": "", + "type": "str", "reportable": True, }, 0x0000FFF8: { @@ -4449,35 +4885,110 @@ class ChipClusters: _REFRIGERATOR_ALARM_CLUSTER_INFO = { "clusterName": "RefrigeratorAlarm", "clusterId": 0x00000057, + "commands": { + }, + "attributes": { + 0x00000000: { + "attributeName": "Mask", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "State", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _DISHWASHER_MODE_SELECT_CLUSTER_INFO = { + "clusterName": "DishwasherModeSelect", + "clusterId": 0x00000059, "commands": { 0x00000000: { "commandId": 0x00000000, - "commandName": "Reset", + "commandName": "ChangeToMode", "args": { - "alarms": "int", - "mask": "int", + "newMode": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "ChangeToModeWithStatus", + "args": { + "newMode": "int", }, }, }, "attributes": { 0x00000000: { - "attributeName": "Mask", + "attributeName": "Description", "attributeId": 0x00000000, + "type": "str", + "reportable": True, + }, + 0x00000002: { + "attributeName": "SupportedModes", + "attributeId": 0x00000002, + "type": "", + "reportable": True, + }, + 0x00000003: { + "attributeName": "CurrentMode", + "attributeId": 0x00000003, "type": "int", "reportable": True, - "writable": True, }, - 0x00000001: { - "attributeName": "Latch", - "attributeId": 0x00000001, + 0x00000004: { + "attributeName": "StartUpMode", + "attributeId": 0x00000004, "type": "int", "reportable": True, + "writable": True, }, - 0x00000002: { - "attributeName": "State", - "attributeId": 0x00000002, + 0x00000005: { + "attributeName": "OnMode", + "attributeId": 0x00000005, "type": "int", "reportable": True, + "writable": True, }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", @@ -15069,8 +15580,14 @@ class ChipClusters: 0x00000045: _BOOLEAN_STATE_CLUSTER_INFO, 0x00000046: _ICD_MANAGEMENT_CLUSTER_INFO, 0x00000050: _MODE_SELECT_CLUSTER_INFO, + 0x00000051: _LAUNDRY_WASHER_MODE_SELECT_CLUSTER_INFO, + 0x00000052: _REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER_INFO, + 0x00000053: _WASHER_CONTROLS_CLUSTER_INFO, + 0x00000054: _RVC_RUN_MODE_SELECT_CLUSTER_INFO, + 0x00000055: _RVC_CLEAN_MODE_SELECT_CLUSTER_INFO, 0x00000056: _TEMPERATURE_CONTROL_CLUSTER_INFO, 0x00000057: _REFRIGERATOR_ALARM_CLUSTER_INFO, + 0x00000059: _DISHWASHER_MODE_SELECT_CLUSTER_INFO, 0x0000005B: _AIR_QUALITY_CLUSTER_INFO, 0x0000005C: _SMOKE_CO_ALARM_CLUSTER_INFO, 0x00000060: _OPERATIONAL_STATE_CLUSTER_INFO, @@ -15197,8 +15714,14 @@ class ChipClusters: "BooleanState": _BOOLEAN_STATE_CLUSTER_INFO, "IcdManagement": _ICD_MANAGEMENT_CLUSTER_INFO, "ModeSelect": _MODE_SELECT_CLUSTER_INFO, + "LaundryWasherModeSelect": _LAUNDRY_WASHER_MODE_SELECT_CLUSTER_INFO, + "RefrigeratorAndTemperatureControlledCabinetModeSelect": _REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER_INFO, + "WasherControls": _WASHER_CONTROLS_CLUSTER_INFO, + "RvcRunModeSelect": _RVC_RUN_MODE_SELECT_CLUSTER_INFO, + "RvcCleanModeSelect": _RVC_CLEAN_MODE_SELECT_CLUSTER_INFO, "TemperatureControl": _TEMPERATURE_CONTROL_CLUSTER_INFO, "RefrigeratorAlarm": _REFRIGERATOR_ALARM_CLUSTER_INFO, + "DishwasherModeSelect": _DISHWASHER_MODE_SELECT_CLUSTER_INFO, "AirQuality": _AIR_QUALITY_CLUSTER_INFO, "SmokeCoAlarm": _SMOKE_CO_ALARM_CLUSTER_INFO, "OperationalState": _OPERATIONAL_STATE_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 2cabdc0001335c..06be17d6c5a97d 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -13531,11 +13531,8 @@ class KeySetReadAllIndices(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="groupKeySetIDs", Tag=0, Type=typing.List[uint]), ]) - groupKeySetIDs: 'typing.List[uint]' = field(default_factory=lambda: []) - @dataclass class KeySetReadAllIndicesResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003F @@ -14872,7 +14869,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="description", Tag=0x00000000, Type=str), - ClusterObjectFieldDescriptor(Label="standardNamespace", Tag=0x00000001, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="standardNamespace", Tag=0x00000001, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000002, Type=typing.List[ModeSelect.Structs.ModeOptionStruct]), ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000003, Type=uint), ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), @@ -14886,7 +14883,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) description: 'str' = None - standardNamespace: 'typing.Union[Nullable, uint]' = None + standardNamespace: 'typing.Union[None, Nullable, uint]' = None supportedModes: 'typing.List[ModeSelect.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None startUpMode: 'typing.Union[None, Nullable, uint]' = None @@ -14898,23 +14895,54 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class ModeTag(MatterIntEnum): + kAuto = 0x00 + kQuick = 0x01 + kQuiet = 0x02 + kLowNoise = 0x03 + kLowEnergy = 0x04 + kVacation = 0x05 + kMin = 0x06 + kMax = 0x07 + kNight = 0x08 + kDay = 0x09 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 10, + + class StatusCode(MatterIntEnum): + kSuccess = 0x00 + kUnsupportedMode = 0x01 + kGenericFailure = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, + class Bitmaps: class Feature(IntFlag): - kDeponoff = 0x1 + kOnOff = 0x1 + kExtendedStatus = 0x2 class Structs: @dataclass - class SemanticTagStruct(ClusterObject): + class ModeTagStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="tagName", Tag=2, Type=typing.Optional[str]), ]) - mfgCode: 'uint' = 0 + mfgCode: 'typing.Optional[uint]' = None value: 'uint' = 0 + tagName: 'typing.Optional[str]' = None @dataclass class ModeOptionStruct(ClusterObject): @@ -14924,12 +14952,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="semanticTags", Tag=2, Type=typing.List[ModeSelect.Structs.SemanticTagStruct]), + ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[ModeSelect.Structs.ModeTagStruct]), ]) label: 'str' = "" mode: 'uint' = 0 - semanticTags: 'typing.List[ModeSelect.Structs.SemanticTagStruct]' = field(default_factory=lambda: []) + modeTags: 'typing.List[ModeSelect.Structs.ModeTagStruct]' = field(default_factory=lambda: []) class Commands: @dataclass @@ -14948,6 +14976,40 @@ def descriptor(cls) -> ClusterObjectDescriptor: newMode: 'uint' = 0 + @dataclass + class ChangeToModeWithStatus(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0050 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ChangeToModeResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), + ]) + + newMode: 'uint' = 0 + + @dataclass + class ChangeToModeResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0050 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), + ]) + + status: 'uint' = 0 + statusText: 'typing.Optional[str]' = None + class Attributes: @dataclass class Description(ClusterAttributeDescriptor): @@ -14977,9 +15039,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class SupportedModes(ClusterAttributeDescriptor): @@ -15143,19 +15205,18 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class TemperatureControl(Cluster): - id: typing.ClassVar[int] = 0x0056 +class LaundryWasherModeSelect(Cluster): + id: typing.ClassVar[int] = 0x0051 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="temperatureSetpoint", Tag=0x00000000, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="minTemperature", Tag=0x00000001, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="maxTemperature", Tag=0x00000002, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="step", Tag=0x00000003, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="currentTemperatureLevelIndex", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="supportedTemperatureLevels", Tag=0x00000005, Type=typing.Optional[typing.List[TemperatureControl.Structs.TemperatureLevelStruct]]), + ClusterObjectFieldDescriptor(Label="description", Tag=0x00000000, Type=str), + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000002, Type=typing.List[LaundryWasherModeSelect.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -15164,12 +15225,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - temperatureSetpoint: 'typing.Optional[int]' = None - minTemperature: 'typing.Optional[int]' = None - maxTemperature: 'typing.Optional[int]' = None - step: 'typing.Optional[int]' = None - currentTemperatureLevelIndex: 'typing.Optional[uint]' = None - supportedTemperatureLevels: 'typing.Optional[typing.List[TemperatureControl.Structs.TemperatureLevelStruct]]' = None + description: 'str' = None + supportedModes: 'typing.List[LaundryWasherModeSelect.Structs.ModeOptionStruct]' = None + currentMode: 'uint' = None + startUpMode: 'typing.Union[None, Nullable, uint]' = None + onMode: 'typing.Union[None, Nullable, uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -15177,29 +15237,58 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class ModeTag(MatterIntEnum): + kNormal = 0x4000 + kDelicate = 0x4001 + kHeavy = 0x4002 + kWhites = 0x4003 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + class Bitmaps: class Feature(IntFlag): - kTemperatureNumber = 0x1 - kTemperatureLevel = 0x2 + kOnOff = 0x1 + kExtendedStatus = 0x2 class Structs: @dataclass - class TemperatureLevelStruct(ClusterObject): + class ModeTagStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="tagName", Tag=2, Type=typing.Optional[str]), + ]) + + mfgCode: 'typing.Optional[uint]' = None + value: 'uint' = 0 + tagName: 'typing.Optional[str]' = None + + @dataclass + class ModeOptionStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="temperatureLevel", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[LaundryWasherModeSelect.Structs.ModeTagStruct]), ]) label: 'str' = "" - temperatureLevel: 'uint' = 0 + mode: 'uint' = 0 + modeTags: 'typing.List[LaundryWasherModeSelect.Structs.ModeTagStruct]' = field(default_factory=lambda: []) class Commands: @dataclass - class SetTemperature(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0056 + class ChangeToMode(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0051 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -15208,51 +15297,67 @@ class SetTemperature(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="targetTemperature", Tag=0, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="targetTemperatureLevel", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - targetTemperature: 'typing.Optional[int]' = None - targetTemperatureLevel: 'typing.Optional[uint]' = None + newMode: 'uint' = 0 - class Attributes: @dataclass - class TemperatureSetpoint(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0056 + class ChangeToModeWithStatus(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0051 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ChangeToModeResponse' @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), + ]) + + newMode: 'uint' = 0 + + @dataclass + class ChangeToModeResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0051 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), + ]) - value: 'typing.Optional[int]' = None + status: 'uint' = 0 + statusText: 'typing.Optional[str]' = None + class Attributes: @dataclass - class MinTemperature(ClusterAttributeDescriptor): + class Description(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x0051 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=str) - value: 'typing.Optional[int]' = None + value: 'str' = "" @dataclass - class MaxTemperature(ClusterAttributeDescriptor): + class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x0051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15260,15 +15365,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.List[LaundryWasherModeSelect.Structs.ModeOptionStruct]) - value: 'typing.Optional[int]' = None + value: 'typing.List[LaundryWasherModeSelect.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) @dataclass - class Step(ClusterAttributeDescriptor): + class CurrentMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x0051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15276,15 +15381,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[int]' = None + value: 'uint' = 0 @dataclass - class CurrentTemperatureLevelIndex(ClusterAttributeDescriptor): + class StartUpMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x0051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15292,15 +15397,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class SupportedTemperatureLevels(ClusterAttributeDescriptor): + class OnMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x0051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15308,15 +15413,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[TemperatureControl.Structs.TemperatureLevelStruct]]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[typing.List[TemperatureControl.Structs.TemperatureLevelStruct]]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x0051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15332,7 +15437,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x0051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15348,7 +15453,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x0051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15364,7 +15469,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x0051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15380,7 +15485,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x0051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15396,7 +15501,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x0051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15410,16 +15515,18 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class RefrigeratorAlarm(Cluster): - id: typing.ClassVar[int] = 0x0057 +class RefrigeratorAndTemperatureControlledCabinetModeSelect(Cluster): + id: typing.ClassVar[int] = 0x0052 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="mask", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="latch", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="state", Tag=0x00000002, Type=uint), + ClusterObjectFieldDescriptor(Label="description", Tag=0x00000000, Type=str), + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000002, Type=typing.List[RefrigeratorAndTemperatureControlledCabinetModeSelect.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -15428,9 +15535,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - mask: 'uint' = None - latch: 'uint' = None - state: 'uint' = None + description: 'str' = None + supportedModes: 'typing.List[RefrigeratorAndTemperatureControlledCabinetModeSelect.Structs.ModeOptionStruct]' = None + currentMode: 'uint' = None + startUpMode: 'typing.Union[None, Nullable, uint]' = None + onMode: 'typing.Union[None, Nullable, uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -15438,14 +15547,56 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class ModeTag(MatterIntEnum): + kRapidCool = 0x4000 + kRapidFreeze = 0x4001 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + class Bitmaps: - class AlarmMap(IntFlag): - kDoorOpen = 0x1 + class Feature(IntFlag): + kOnOff = 0x1 + kExtendedStatus = 0x2 + + class Structs: + @dataclass + class ModeTagStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="tagName", Tag=2, Type=typing.Optional[str]), + ]) + + mfgCode: 'typing.Optional[uint]' = None + value: 'uint' = 0 + tagName: 'typing.Optional[str]' = None + + @dataclass + class ModeOptionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[RefrigeratorAndTemperatureControlledCabinetModeSelect.Structs.ModeTagStruct]), + ]) + + label: 'str' = "" + mode: 'uint' = 0 + modeTags: 'typing.List[RefrigeratorAndTemperatureControlledCabinetModeSelect.Structs.ModeTagStruct]' = field(default_factory=lambda: []) class Commands: @dataclass - class Reset(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0057 + class ChangeToMode(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0052 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -15454,67 +15605,131 @@ class Reset(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="alarms", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="mask", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - alarms: 'uint' = 0 - mask: 'typing.Optional[uint]' = None + newMode: 'uint' = 0 - class Attributes: @dataclass - class Mask(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0057 + class ChangeToModeWithStatus(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0052 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ChangeToModeResponse' @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), + ]) + + newMode: 'uint' = 0 + + @dataclass + class ChangeToModeResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0052 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), + ]) - value: 'uint' = 0 + status: 'uint' = 0 + statusText: 'typing.Optional[str]' = None + class Attributes: @dataclass - class Latch(ClusterAttributeDescriptor): + class Description(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x0052 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=str) - value: 'uint' = 0 + value: 'str' = "" @dataclass - class State(ClusterAttributeDescriptor): + class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x0052 @ChipUtility.classproperty def attribute_id(cls) -> int: return 0x00000002 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[RefrigeratorAndTemperatureControlledCabinetModeSelect.Structs.ModeOptionStruct]) + + value: 'typing.List[RefrigeratorAndTemperatureControlledCabinetModeSelect.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + + @dataclass + class CurrentMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0052 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) value: 'uint' = 0 + @dataclass + class StartUpMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0052 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class OnMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0052 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x0052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15530,7 +15745,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x0052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15546,7 +15761,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x0052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15562,7 +15777,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x0052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15578,7 +15793,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x0052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15594,7 +15809,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x0052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15606,31 +15821,1593 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 - class Events: + +@dataclass +class WasherControls(Cluster): + id: typing.ClassVar[int] = 0x0053 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="spinSpeeds", Tag=0x00000000, Type=typing.Optional[typing.List[str]]), + ClusterObjectFieldDescriptor(Label="spinSpeedCurrent", Tag=0x00000001, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="numberOfRinses", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="maxRinses", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + spinSpeeds: 'typing.Optional[typing.List[str]]' = None + spinSpeedCurrent: 'typing.Union[None, Nullable, uint]' = None + numberOfRinses: 'typing.Union[None, Nullable, uint]' = None + maxRinses: 'typing.Optional[uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Bitmaps: + class Feature(IntFlag): + kSpin = 0x1 + kRinse = 0x2 + + class Attributes: @dataclass - class Notify(ClusterEvent): + class SpinSpeeds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x0053 @ChipUtility.classproperty - def event_id(cls) -> int: + def attribute_id(cls) -> int: return 0x00000000 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="active", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="inactive", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="state", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="mask", Tag=3, Type=uint), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[str]]) - active: 'uint' = 0 - inactive: 'uint' = 0 - state: 'uint' = 0 - mask: 'uint' = 0 + value: 'typing.Optional[typing.List[str]]' = None + + @dataclass + class SpinSpeedCurrent(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0053 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class NumberOfRinses(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0053 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class MaxRinses(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0053 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0053 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0053 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0053 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0053 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0053 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0053 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + +@dataclass +class RvcRunModeSelect(Cluster): + id: typing.ClassVar[int] = 0x0054 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="description", Tag=0x00000000, Type=str), + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000002, Type=typing.List[RvcRunModeSelect.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + description: 'str' = None + supportedModes: 'typing.List[RvcRunModeSelect.Structs.ModeOptionStruct]' = None + currentMode: 'uint' = None + startUpMode: 'typing.Union[None, Nullable, uint]' = None + onMode: 'typing.Union[None, Nullable, uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class ModeTag(MatterIntEnum): + kIdle = 0x4000 + kCleaning = 0x4001 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + + class StatusCode(MatterIntEnum): + kStuck = 0x41 + kDustBinMissing = 0x42 + kDustBinFull = 0x43 + kWaterTankEmpty = 0x44 + kWaterTankMissing = 0x45 + kWaterTankLidOpen = 0x46 + kMopCleaningPadMissing = 0x47 + kBatteryLow = 0x48 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + + class Bitmaps: + class Feature(IntFlag): + kOnOff = 0x1 + kExtendedStatus = 0x2 + + class Structs: + @dataclass + class ModeTagStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="tagName", Tag=2, Type=typing.Optional[str]), + ]) + + mfgCode: 'typing.Optional[uint]' = None + value: 'uint' = 0 + tagName: 'typing.Optional[str]' = None + + @dataclass + class ModeOptionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[RvcRunModeSelect.Structs.ModeTagStruct]), + ]) + + label: 'str' = "" + mode: 'uint' = 0 + modeTags: 'typing.List[RvcRunModeSelect.Structs.ModeTagStruct]' = field(default_factory=lambda: []) + + class Commands: + @dataclass + class ChangeToMode(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0054 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), + ]) + + newMode: 'uint' = 0 + + @dataclass + class ChangeToModeWithStatus(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0054 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ChangeToModeResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), + ]) + + newMode: 'uint' = 0 + + @dataclass + class ChangeToModeResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0054 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), + ]) + + status: 'uint' = 0 + statusText: 'typing.Optional[str]' = None + + class Attributes: + @dataclass + class Description(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0054 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + + value: 'str' = "" + + @dataclass + class SupportedModes(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0054 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[RvcRunModeSelect.Structs.ModeOptionStruct]) + + value: 'typing.List[RvcRunModeSelect.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + + @dataclass + class CurrentMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0054 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class StartUpMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0054 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class OnMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0054 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0054 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0054 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0054 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0054 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0054 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0054 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + +@dataclass +class RvcCleanModeSelect(Cluster): + id: typing.ClassVar[int] = 0x0055 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="description", Tag=0x00000000, Type=str), + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000002, Type=typing.List[RvcCleanModeSelect.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + description: 'str' = None + supportedModes: 'typing.List[RvcCleanModeSelect.Structs.ModeOptionStruct]' = None + currentMode: 'uint' = None + startUpMode: 'typing.Union[None, Nullable, uint]' = None + onMode: 'typing.Union[None, Nullable, uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class ModeTag(MatterIntEnum): + kDeepClean = 0x4000 + kVacuum = 0x4001 + kMop = 0x4002 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + + class StatusCode(MatterIntEnum): + kCleaningInProgress = 0x40 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + + class Bitmaps: + class Feature(IntFlag): + kOnOff = 0x1 + kExtendedStatus = 0x2 + + class Structs: + @dataclass + class ModeTagStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="tagName", Tag=2, Type=typing.Optional[str]), + ]) + + mfgCode: 'typing.Optional[uint]' = None + value: 'uint' = 0 + tagName: 'typing.Optional[str]' = None + + @dataclass + class ModeOptionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[RvcCleanModeSelect.Structs.ModeTagStruct]), + ]) + + label: 'str' = "" + mode: 'uint' = 0 + modeTags: 'typing.List[RvcCleanModeSelect.Structs.ModeTagStruct]' = field(default_factory=lambda: []) + + class Commands: + @dataclass + class ChangeToMode(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0055 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), + ]) + + newMode: 'uint' = 0 + + @dataclass + class ChangeToModeWithStatus(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0055 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ChangeToModeResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), + ]) + + newMode: 'uint' = 0 + + @dataclass + class ChangeToModeResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0055 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), + ]) + + status: 'uint' = 0 + statusText: 'typing.Optional[str]' = None + + class Attributes: + @dataclass + class Description(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0055 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + + value: 'str' = "" + + @dataclass + class SupportedModes(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0055 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[RvcCleanModeSelect.Structs.ModeOptionStruct]) + + value: 'typing.List[RvcCleanModeSelect.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + + @dataclass + class CurrentMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0055 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class StartUpMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0055 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class OnMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0055 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0055 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0055 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0055 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0055 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0055 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0055 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + +@dataclass +class TemperatureControl(Cluster): + id: typing.ClassVar[int] = 0x0056 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="temperatureSetpoint", Tag=0x00000000, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="minTemperature", Tag=0x00000001, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="maxTemperature", Tag=0x00000002, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="step", Tag=0x00000003, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="selectedTemperatureLevel", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="supportedTemperatureLevels", Tag=0x00000005, Type=typing.Optional[typing.List[str]]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + temperatureSetpoint: 'typing.Optional[int]' = None + minTemperature: 'typing.Optional[int]' = None + maxTemperature: 'typing.Optional[int]' = None + step: 'typing.Optional[int]' = None + selectedTemperatureLevel: 'typing.Optional[uint]' = None + supportedTemperatureLevels: 'typing.Optional[typing.List[str]]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Bitmaps: + class Feature(IntFlag): + kTemperatureNumber = 0x1 + kTemperatureLevel = 0x2 + kTemperatureStep = 0x4 + + class Commands: + @dataclass + class SetTemperature(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0056 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="targetTemperature", Tag=0, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="targetTemperatureLevel", Tag=1, Type=typing.Optional[uint]), + ]) + + targetTemperature: 'typing.Optional[int]' = None + targetTemperatureLevel: 'typing.Optional[uint]' = None + + class Attributes: + @dataclass + class TemperatureSetpoint(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + + value: 'typing.Optional[int]' = None + + @dataclass + class MinTemperature(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + + value: 'typing.Optional[int]' = None + + @dataclass + class MaxTemperature(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + + value: 'typing.Optional[int]' = None + + @dataclass + class Step(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + + value: 'typing.Optional[int]' = None + + @dataclass + class SelectedTemperatureLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class SupportedTemperatureLevels(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[str]]) + + value: 'typing.Optional[typing.List[str]]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0056 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + +@dataclass +class RefrigeratorAlarm(Cluster): + id: typing.ClassVar[int] = 0x0057 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mask", Tag=0x00000000, Type=uint), + ClusterObjectFieldDescriptor(Label="state", Tag=0x00000002, Type=uint), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + mask: 'uint' = None + state: 'uint' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Bitmaps: + class AlarmMap(IntFlag): + kDoorOpen = 0x1 + + class Attributes: + @dataclass + class Mask(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0057 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class State(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0057 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0057 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0057 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0057 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0057 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0057 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0057 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + class Events: + @dataclass + class Notify(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0057 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="active", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="inactive", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="state", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="mask", Tag=3, Type=uint), + ]) + + active: 'uint' = 0 + inactive: 'uint' = 0 + state: 'uint' = 0 + mask: 'uint' = 0 + + +@dataclass +class DishwasherModeSelect(Cluster): + id: typing.ClassVar[int] = 0x0059 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="description", Tag=0x00000000, Type=str), + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000002, Type=typing.List[DishwasherModeSelect.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + description: 'str' = None + supportedModes: 'typing.List[DishwasherModeSelect.Structs.ModeOptionStruct]' = None + currentMode: 'uint' = None + startUpMode: 'typing.Union[None, Nullable, uint]' = None + onMode: 'typing.Union[None, Nullable, uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class ModeTag(MatterIntEnum): + kNormal = 0x4000 + kHeavy = 0x4001 + kLight = 0x4002 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + + class Bitmaps: + class Feature(IntFlag): + kOnOff = 0x1 + kExtendedStatus = 0x2 + + class Structs: + @dataclass + class ModeTagStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="tagName", Tag=2, Type=typing.Optional[str]), + ]) + + mfgCode: 'typing.Optional[uint]' = None + value: 'uint' = 0 + tagName: 'typing.Optional[str]' = None + + @dataclass + class ModeOptionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[DishwasherModeSelect.Structs.ModeTagStruct]), + ]) + + label: 'str' = "" + mode: 'uint' = 0 + modeTags: 'typing.List[DishwasherModeSelect.Structs.ModeTagStruct]' = field(default_factory=lambda: []) + + class Commands: + @dataclass + class ChangeToMode(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0059 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), + ]) + + newMode: 'uint' = 0 + + @dataclass + class ChangeToModeWithStatus(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0059 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ChangeToModeResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), + ]) + + newMode: 'uint' = 0 + + @dataclass + class ChangeToModeResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0059 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), + ]) + + status: 'uint' = 0 + statusText: 'typing.Optional[str]' = None + + class Attributes: + @dataclass + class Description(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0059 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + + value: 'str' = "" + + @dataclass + class SupportedModes(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0059 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[DishwasherModeSelect.Structs.ModeOptionStruct]) + + value: 'typing.List[DishwasherModeSelect.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + + @dataclass + class CurrentMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0059 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class StartUpMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0059 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class OnMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0059 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0059 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0059 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0059 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0059 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0059 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0059 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 @dataclass diff --git a/src/controller/python/chip/setup_payload/setup_payload.py b/src/controller/python/chip/setup_payload/setup_payload.py index fd3d8e1db036b7..ea5f786fa6140d 100644 --- a/src/controller/python/chip/setup_payload/setup_payload.py +++ b/src/controller/python/chip/setup_payload/setup_payload.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2021-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. @@ -15,6 +15,7 @@ # from ctypes import CFUNCTYPE, c_char_p, c_int32, c_uint8 +from typing import Optional from chip.exceptions import ChipStackError from chip.native import GetLibraryHandle, NativeLibraryHandleMethodArguments @@ -65,6 +66,7 @@ def ParseManualPairingCode(self, manualPairingCode: str): return self + # DEPRECATED def PrintOnboardingCodes(self, passcode, vendorId, productId, discriminator, customFlow, capabilities, version): self.Clear() err = self.chipLib.pychip_SetupPayload_PrintOnboardingCodes( @@ -73,6 +75,7 @@ def PrintOnboardingCodes(self, passcode, vendorId, productId, discriminator, cus if err != 0: raise ChipStackError(err) + # DEPRECATED def Print(self): for name, value in self.attributes.items(): decorated_value = self.__DecorateValue(name, value) @@ -83,10 +86,12 @@ def Print(self): print( f"Vendor attribute '{tag:>3}': {self.vendor_attributes[tag]}") + # DEPRECATED def Clear(self): self.attributes.clear() self.vendor_attributes.clear() + # DEPRECATED def __DecorateValue(self, name, value): if name == "RendezvousInformation": rendezvous_methods = [] @@ -113,3 +118,51 @@ def __InitNativeFunctions(self, chipLib): setter.Set("pychip_SetupPayload_PrintOnboardingCodes", c_int32, [c_uint32, c_uint16, c_uint16, c_uint16, uint8_t, uint8_t, uint8_t]) + + # Getters from parsed contents. + # Prefer using the methods below to access setup payload information once parse. + + @property + def vendor_id(self) -> int: + return int(self.attributes.get("VendorID", "0")) + + @property + def product_id(self) -> int: + return int(self.attributes.get("ProductID", "0")) + + @property + def setup_passcode(self) -> int: + if "SetUpPINCode" not in self.attributes: + raise KeyError("Missing setup passcode in setup payload: parsing likely not yet done") + + return int(self.attributes["SetUpPINCode"]) + + @property + def long_discriminator(self) -> Optional[int]: + if "Long discriminator" not in self.attributes: + return None + + return int(self.attributes["Long discriminator"]) + + @property + def short_discriminator(self) -> Optional[int]: + if "Short discriminator" not in self.attributes: + return None + + return int(self.attributes["Short discriminator"]) + + @property + def commissioning_flow(self) -> int: + return int(self.attributes.get("CommissioningFlow", "0")) + + @property + def rendezvous_information(self) -> int: + return int(self.attributes.get("RendezvousInformation", "0")) + + @property + def supports_ble_commissioning(self) -> bool: + return (self.rendezvous_information & 0b010) != 0 + + @property + def supports_on_network_commissioning(self) -> bool: + return (self.rendezvous_information & 0b100) != 0 diff --git a/src/credentials/tests/TestFabricTable.cpp b/src/credentials/tests/TestFabricTable.cpp index f098dc78bcb49a..c6e7998f0c1788 100644 --- a/src/credentials/tests/TestFabricTable.cpp +++ b/src/credentials/tests/TestFabricTable.cpp @@ -1083,6 +1083,113 @@ void TestAddMultipleSameRootDifferentFabricId(nlTestSuite * inSuite, void * inCo NL_TEST_ASSERT(inSuite, numStorageKeysAfterSecondAdd == (numStorageKeysAfterFirstAdd + 5)); // Add 3 certs, 1 metadata, 1 opkey } +void TestAddMultipleSameFabricIdDifferentRoot(nlTestSuite * inSuite, void * inContext) +{ + Credentials::TestOnlyLocalCertificateAuthority fabricCertAuthority1; + Credentials::TestOnlyLocalCertificateAuthority fabricCertAuthority2; + + chip::TestPersistentStorageDelegate storage; + NL_TEST_ASSERT(inSuite, fabricCertAuthority1.Init().IsSuccess()); + NL_TEST_ASSERT(inSuite, fabricCertAuthority2.Init().IsSuccess()); + + constexpr uint16_t kVendorId = 0xFFF1u; + + // Initialize a fabric table. + ScopedFabricTable fabricTableHolder; + NL_TEST_ASSERT(inSuite, fabricTableHolder.Init(&storage) == CHIP_NO_ERROR); + FabricTable & fabricTable = fabricTableHolder.GetFabricTable(); + + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + + uint8_t rcac1Buf[kMaxCHIPCertLength]; + MutableByteSpan rcac1Span{ rcac1Buf }; + + // First scope: add FabricID 1111, node ID 55 + { + FabricId fabricId = 1111; + NodeId nodeId = 55; + + uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + MutableByteSpan csrSpan{ csrBuf }; + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); + + NL_TEST_ASSERT_SUCCESS(inSuite, + fabricCertAuthority1.SetIncludeIcac(true).GenerateNocChain(fabricId, nodeId, csrSpan).GetStatus()); + ByteSpan rcac = fabricCertAuthority1.GetRcac(); + // Keep a copy for second scope check + CopySpanToMutableSpan(rcac, rcac1Span); + + ByteSpan icac = fabricCertAuthority1.GetIcac(); + ByteSpan noc = fabricCertAuthority1.GetNoc(); + + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); + FabricIndex newFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT_SUCCESS(inSuite, + fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, icac, kVendorId, &newFabricIndex)); + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 1); + NL_TEST_ASSERT(inSuite, newFabricIndex == 1); + + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.CommitPendingFabricData()); + + // Validate contents + const auto * fabricInfo = fabricTable.FindFabricWithIndex(1); + NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); + if (fabricInfo != nullptr) + { + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricIndex() == 1); + NL_TEST_ASSERT(inSuite, fabricInfo->GetNodeId() == 55); + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricId() == 1111); + NL_TEST_ASSERT(inSuite, fabricInfo->GetVendorId() == kVendorId); + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricLabel().size() == 0); + } + } + size_t numStorageKeysAfterFirstAdd = storage.GetNumKeys(); + NL_TEST_ASSERT(inSuite, numStorageKeysAfterFirstAdd == 7); // Metadata, index, 3 certs, 1 opkey, last known good time + + // Second scope: add FabricID 1111, node ID 66, different root from first + { + FabricId fabricId = 1111; + NodeId nodeId = 66; + + uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + MutableByteSpan csrSpan{ csrBuf }; + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); + + NL_TEST_ASSERT_SUCCESS(inSuite, + fabricCertAuthority2.SetIncludeIcac(true).GenerateNocChain(fabricId, nodeId, csrSpan).GetStatus()); + ByteSpan rcac2 = fabricCertAuthority2.GetRcac(); + NL_TEST_ASSERT(inSuite, !rcac2.data_equal(rcac1Span)); + + ByteSpan icac = fabricCertAuthority2.GetIcac(); + ByteSpan noc = fabricCertAuthority2.GetNoc(); + + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 1); + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac2)); + FabricIndex newFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT_SUCCESS(inSuite, + fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, icac, kVendorId, &newFabricIndex)); + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 2); + NL_TEST_ASSERT(inSuite, newFabricIndex == 2); + + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.CommitPendingFabricData()); + + // Validate contents + const auto * fabricInfo = fabricTable.FindFabricWithIndex(2); + NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); + if (fabricInfo != nullptr) + { + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricIndex() == 2); + NL_TEST_ASSERT(inSuite, fabricInfo->GetNodeId() == 66); + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricId() == 1111); + NL_TEST_ASSERT(inSuite, fabricInfo->GetVendorId() == kVendorId); + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricLabel().size() == 0); + } + } + size_t numStorageKeysAfterSecondAdd = storage.GetNumKeys(); + NL_TEST_ASSERT(inSuite, numStorageKeysAfterSecondAdd == (numStorageKeysAfterFirstAdd + 5)); // Add 3 certs, 1 metadata, 1 opkey +} + void TestPersistence(nlTestSuite * inSuite, void * inContext) { /** @@ -2788,6 +2895,7 @@ static const nlTest sTests[] = NL_TEST_DEF("Set Last Known Good Time", TestSetLastKnownGoodTime), NL_TEST_DEF("Test basic AddNOC flow", TestBasicAddNocUpdateNocFlow), NL_TEST_DEF("Test adding multiple fabrics that chain to same root, different fabric ID", TestAddMultipleSameRootDifferentFabricId), + NL_TEST_DEF("Test adding multiple fabrics that chain to different roots, same fabric ID", TestAddMultipleSameFabricIdDifferentRoot), NL_TEST_DEF("Validate fabrics are loaded from persistence at FabricTable::init", TestPersistence), NL_TEST_DEF("Test fail-safe handling during AddNOC", TestAddNocFailSafe), NL_TEST_DEF("Test fail-safe handling during UpdateNoc", TestUpdateNocFailSafe), diff --git a/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h new file mode 100644 index 00000000000000..001c7058cdb34c --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import +#import + +/** + * This file defines manual backwards-compat shims of various sorts to handle + * API changes that happened. + */ + +NS_ASSUME_NONNULL_BEGIN + +@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesParams () +/** + * This command used to incorrectly have a groupKeySetIDs field. + */ +@property (nonatomic, copy) NSArray * groupKeySetIDs API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("This field has been removed"); + +@end + +API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +MTR_NEWLY_DEPRECATED("Please use MTRModeSelectClusterModeTagStruct") +@interface MTRModeSelectClusterSemanticTagStruct : MTRModeSelectClusterModeTagStruct +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.mm b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.mm new file mode 100644 index 00000000000000..77949e0c765759 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.mm @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import + +/** + * This file defines implementations of manual backwards-compat shims of various sorts to handle + * API changes that happened. + */ + +@implementation MTRModeSelectClusterSemanticTagStruct +@end diff --git a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h index c16aaf692de1bb..f1cce0e53e6699 100644 --- a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h +++ b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h @@ -88,6 +88,14 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, assign) BOOL skipCommissioningComplete MTR_NEWLY_AVAILABLE; +/** + * The country code to provide to the device during commissioning. + * + * If not nil, this must be a 2-character ISO 3166-1 country code, which the + * device can use to decide on things like radio communications bands. + */ +@property (nonatomic, copy, nullable) NSString * countryCode MTR_NEWLY_AVAILABLE; + @end @interface MTRCommissioningParameters (Deprecated) diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 164f395b146fdf..dc158c89f768ec 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -203,7 +203,8 @@ - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceControlle - (NSString *)description { - return [NSString stringWithFormat:@"[fabric: %u, nodeID: %@]", self, _fabricIndex, _nodeID]; + return [NSString + stringWithFormat:@"[fabric: %u, nodeID: 0x%016llX]", self, _fabricIndex, _nodeID.unsignedLongLongValue]; } + (MTRDevice *)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index e6388e083cd3fa..2f01e499ad55db 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -31,6 +31,7 @@ #import "MTRPersistentStorageDelegateBridge.h" #import "MTRSetupPayload.h" #import "NSDataSpanConversion.h" +#import "NSStringSpanConversion.h" #import #import #import @@ -492,6 +493,9 @@ - (BOOL)commissionNodeWithID:(NSNumber *)nodeID self, commissioningParams.deviceAttestationDelegate, timeoutSecs, shouldWaitAfterDeviceAttestation); params.SetDeviceAttestationDelegate(self->_deviceAttestationDelegateBridge); } + if (commissioningParams.countryCode != nil) { + params.SetCountryCode(AsCharSpan(commissioningParams.countryCode)); + } chip::NodeId deviceId = [nodeID unsignedLongLongValue]; self->_operationalCredentialsDelegate->SetDeviceID(deviceId); diff --git a/src/darwin/Framework/CHIP/MTRIMDispatch.mm b/src/darwin/Framework/CHIP/MTRIMDispatch.mm index f6276fcfcc3979..e1dfd9d426344d 100644 --- a/src/darwin/Framework/CHIP/MTRIMDispatch.mm +++ b/src/darwin/Framework/CHIP/MTRIMDispatch.mm @@ -230,9 +230,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aPath, TLV::TLVRea * Called by the OTA provider cluster server to determine an index * into its array. */ -uint16_t emberAfFindClusterServerEndpointIndex(EndpointId endpoint, ClusterId clusterId) +uint16_t emberAfGetClusterServerEndpointIndex(EndpointId endpoint, ClusterId cluster, uint16_t fixedClusterServerEndpointCount) { - if (endpoint == kSupportedEndpoint && clusterId == OtaSoftwareUpdateProvider::Id) { + if (endpoint == kSupportedEndpoint && cluster == OtaSoftwareUpdateProvider::Id) { return 0; } diff --git a/src/darwin/Framework/CHIP/Matter.h b/src/darwin/Framework/CHIP/Matter.h index 094494dd20a1bc..a9da6744c08285 100644 --- a/src/darwin/Framework/CHIP/Matter.h +++ b/src/darwin/Framework/CHIP/Matter.h @@ -18,6 +18,7 @@ #import #import +#import #import #import #import diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index 6ff3a05793ee17..fda7cee26be83a 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -271,11 +271,15 @@ reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value ]; } {{#unless hasArguments}} +{{! KeySetReadAllIndices grew this params-less API later _after_ it had already been shipped, so it needs to be special-cased here }} +{{#unless (and (isStrEqual cluster "GroupKeyManagement") + (isStrEqual command "KeySetReadAllIndices"))}} - (void){{asLowerCamelCase command}}WithCompletionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler { [self {{asLowerCamelCase command}}WithParams:nil completionHandler:completionHandler]; } {{/unless}} +{{/unless}} {{/if}} {{/inline}} {{> commandImpl cluster=(compatClusterNameRemapping parent.name) diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt index 576f811105c94f..8432e20679bc3f 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt @@ -35,7 +35,14 @@ NS_ASSUME_NONNULL_BEGIN */ - (void){{asLowerCamelCase name}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField }}_Nullable{{/unless}})params completion:({{>command_completion_type command=.}})completion {{availability cluster command=command minimalRelease="First major API revamp"}}; {{#unless hasArguments}} -- (void){{asLowerCamelCase name}}WithCompletion:({{>command_completion_type command=.}})completion {{availability cluster command=command minimalRelease="First major API revamp"}}; +- (void){{asLowerCamelCase name}}WithCompletion:({{>command_completion_type command=.}})completion +{{! KeySetReadAllIndices grew this params-less API later _after_ it had already been shipped, so it needs to be special-cased here }} +{{#if (and (isStrEqual command "KeySetReadAllIndices") + (isStrEqual cluster "GroupKeyManagement"))}} +{{availability cluster command=command minimalRelease="Fall 2023"}}; +{{else}} +{{availability cluster command=command minimalRelease="First major API revamp"}}; +{{/if}} {{/unless}} {{/if}} {{/inline}} @@ -197,9 +204,13 @@ typedef NS_OPTIONS({{asUnderlyingZclType name}}, {{objCEnumName clusterName bitm - (void){{asLowerCamelCase command}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField }}_Nullable{{/unless}})params completionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler {{availability cluster command=command deprecatedRelease="First major API revamp" deprecationMessage=(concat "Please use " (asLowerCamelCase name) "WithParams:completion:")}}; {{#unless hasArguments}} +{{! KeySetReadAllIndices grew this params-less API later _after_ it had already been shipped, so it needs to be special-cased here }} +{{#unless (and (isStrEqual cluster "GroupKeyManagement") + (isStrEqual command "KeySetReadAllIndices"))}} - (void){{asLowerCamelCase command}}WithCompletionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler {{availability cluster command=command deprecatedRelease="First major API revamp" deprecationMessage=(concat "Please use " (asLowerCamelCase name) "WithCompletion:")}}; {{/unless}} +{{/unless}} {{/if}} {{/inline}} {{> commandDecl cluster=(compatClusterNameRemapping parent.name) diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt index 11ba013f232f8b..169be4edc3b1c0 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt @@ -261,11 +261,15 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID ]; } {{#unless hasArguments}} +{{! KeySetReadAllIndices grew this params-less API later _after_ it had already been shipped, so it needs to be special-cased here }} +{{#unless (and (isStrEqual cluster "GroupKeyManagement") + (isStrEqual command "KeySetReadAllIndices"))}} - (void){{asLowerCamelCase command}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler { [self {{asLowerCamelCase command}}WithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } {{/unless}} +{{/unless}} {{/if}} {{/inline}} {{> commandImpl cluster=(compatClusterNameRemapping parent.name) diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt index ef09d89f9e165f..3285e3cba52cea 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt @@ -30,7 +30,14 @@ NS_ASSUME_NONNULL_BEGIN {{#if (isSupported cluster command=command)}} - (void){{asLowerCamelCase name}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion {{availability cluster command=command minimalRelease="First major API revamp"}}; {{#unless hasArguments}} -- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion {{availability cluster command=command minimalRelease="First major API revamp"}}; +- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion +{{! KeySetReadAllIndices grew this params-less API later _after_ it had already been shipped, so it needs to be special-cased here }} +{{#if (and (isStrEqual command "KeySetReadAllIndices") + (isStrEqual cluster "GroupKeyManagement"))}} +{{availability cluster command=command minimalRelease="Fall 2023"}}; +{{else}} +{{availability cluster command=command minimalRelease="First major API revamp"}}; +{{/if}} {{/unless}} {{/if}} {{/inline}} @@ -91,8 +98,12 @@ NS_ASSUME_NONNULL_BEGIN (isSupported cluster command=command))}} - (void){{asLowerCamelCase command}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler {{availability cluster command=command deprecatedRelease="First major API revamp" deprecationMessage=(concat "Please use " (asLowerCamelCase name) "WithParams:expectedValues:expectedValueInterval:completion:")}}; {{#unless hasArguments}} +{{! KeySetReadAllIndices grew this params-less API later _after_ it had already been shipped, so it needs to be special-cased here }} +{{#unless (and (isStrEqual cluster "GroupKeyManagement") + (isStrEqual command "KeySetReadAllIndices"))}} - (void){{asLowerCamelCase command}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler {{availability cluster command=command deprecatedRelease="First major API revamp" deprecationMessage=(concat "Please use " (asLowerCamelCase name) "WithExpectedValues:expectedValueInterval:completion:")}}; {{/unless}} +{{/unless}} {{/if}} {{/inline}} {{> commandDecl cluster=(compatClusterNameRemapping parent.name) diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt index 638a000cb8351a..cd76e066bdf935 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt @@ -7,6 +7,7 @@ #import "MTRLogging_Internal.h" #import "NSStringSpanConversion.h" #import "NSDataSpanConversion.h" +#import "MTRBackwardsCompatShims.h" #include #include diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 1d98350e945875..a7ee7710727e08 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -5316,8 +5316,6 @@ - ThreadMetricsStruct GeneralDiagnostics: - NetworkInterface - ModeSelect: - - SemanticTagStruct OperationalCredentials: - FabricDescriptorStruct DoorLock: @@ -5434,10 +5432,6 @@ - iPv4Addresses - iPv6Addresses - type - ModeSelect: - SemanticTagStruct: - - mfgCode - - value OperationalCredentials: FabricDescriptorStruct: - rootPublicKey @@ -6534,8 +6528,6 @@ ThreadMetricsStruct: ThreadMetrics GeneralDiagnostics: NetworkInterface: NetworkInterfaceType - ModeSelect: - SemanticTagStruct: SemanticTag OperationalCredentials: FabricDescriptorStruct: FabricDescriptor DoorLock: @@ -7046,7 +7038,7 @@ PumpFeature: LocalOperation: Local -- release: "TBD" +- release: "Fall 2023" versions: "future" introduced: clusters: @@ -8056,7 +8048,6 @@ - ClusterRevision RefrigeratorAlarm: - Mask - - Latch - State - GeneratedCommandList - AcceptedCommandList @@ -8069,7 +8060,7 @@ - MinTemperature - MaxTemperature - Step - - CurrentTemperatureLevelIndex + - SelectedTemperatureLevel - SupportedTemperatureLevels - GeneratedCommandList - AcceptedCommandList @@ -8129,8 +8120,6 @@ - Start - Resume - OperationalCommandResponse - RefrigeratorAlarm: - - Reset TemperatureControl: - SetTemperature DoorLock: @@ -8149,10 +8138,6 @@ OperationalState: OperationalCommandResponse: - commandResponseState - RefrigeratorAlarm: - Reset: - - alarms - - mask TemperatureControl: SetTemperature: - targetTemperature @@ -8164,6 +8149,8 @@ - ProductAppearanceStruct BridgedDeviceBasicInformation: - ProductAppearanceStruct + ModeSelect: + - ModeTagStruct NetworkCommissioning: - WiFiInterfaceScanResultStruct - ThreadInterfaceScanResultStruct @@ -8171,8 +8158,6 @@ OperationalState: - OperationalStateStruct - ErrorStateStruct - TemperatureControl: - - TemperatureLevelStruct ThreadNetworkDiagnostics: - NeighborTableStruct - RouteTableStruct @@ -8190,6 +8175,12 @@ ProductAppearanceStruct: - finish - primaryColor + ModeSelect: + ModeTagStruct: + - mfgCode + - value + ModeOptionStruct: + - modeTags NetworkCommissioning: WiFiInterfaceScanResultStruct: - security @@ -8218,10 +8209,6 @@ - errorStateID - errorStateLabel - errorStateDetails - TemperatureControl: - TemperatureLevelStruct: - - label - - temperatureLevel ThreadNetworkDiagnostics: NeighborTableStruct: - extAddress @@ -9569,6 +9556,9 @@ - GroupNames NameSupportBitmap: - GroupNames + ModeSelect: + Feature: + - OnOff NetworkCommissioning: WiFiSecurityBitmap: - Unencrypted @@ -9943,6 +9933,7 @@ Feature: - TemperatureNumber - TemperatureLevel + - TemperatureStep SmokeCOAlarm: Feature: - SmokeAlarm @@ -9975,6 +9966,10 @@ ThreadNetworkDiagnostics: - NeighborTable - RouteTable + struct fields: + ModeSelect: + ModeOptionStruct: + - semanticTags bitmaps: Groups: - GroupClusterFeature @@ -9984,6 +9979,10 @@ - PressureFeature PumpConfigurationAndControl: - PumpFeature + bitmap values: + ModeSelect: + Feature: + - DEPONOFF renames: attributes: TimeSynchronization: @@ -9996,6 +9995,8 @@ structs: AccessControl: AccessControlTargetStruct: Target + ModeSelect: + ModeTagStruct: SemanticTag NetworkCommissioning: WiFiInterfaceScanResultStruct: WiFiInterfaceScanResult ThreadInterfaceScanResultStruct: ThreadInterfaceScanResult @@ -10003,6 +10004,10 @@ ThreadNetworkDiagnostics: NeighborTableStruct: NeighborTable RouteTableStruct: RouteTable + struct fields: + ModeSelect: + ModeOptionStruct: + modeTags: semanticTags enum values: TimeSynchronization: TimeSourceEnum: @@ -10031,10 +10036,37 @@ Feature: PressureFeature PumpConfigurationAndControl: Feature: PumpFeature + bitmap values: + ModeSelect: + Feature: + OnOff: DEPONOFF provisional: clusters: # Not ready to be public API yet. - ICDManagement + - LaundryWasherModeSelect + - RefrigeratorAndTemperatureControlledCabinetModeSelect + - RVCRunModeSelect + - RVCCleanModeSelect + - DishwasherModeSelect + commands: + ModeSelect: + # Still very in-flux. + - ChangeToModeWithStatus + - ChangeToModeResponse + struct fields: + ModeSelect: + ModeTagStruct: + - tagName + enums: + ModeSelect: + # Still very in-flux. + - ModeTag + - StatusCode + bitmap values: + ModeSelect: + Feature: + - ExtendedStatus # Once we actually unmark TimeSynchronization as provisional, all these bits should go away too, and we should instead # mark things as introduced/deprecated as needed. The "ids" entries should go away, in particular. ids: diff --git a/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt b/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt index 46c4d9179696f6..16a9acbc6d4048 100644 --- a/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt @@ -30,7 +30,9 @@ {{#if_is_struct type}} {{target}} = [{{asObjectiveCClass type cluster forceNotList=true}} new]; {{#zcl_struct_items_by_struct_and_cluster_name type cluster}} + {{#if (isSupported (asUpperCamelCase ../cluster preserveAcronyms=true) struct=(asUpperCamelCase ../type preserveAcronyms=true) structField=(asStructPropertyName label))}} {{>decode_value target=(concat ../target "." (asStructPropertyName label)) source=(concat ../source "." (asLowerCamelCase label)) cluster=../cluster errorCode=../errorCode depth=(incrementDepth ../depth) }} + {{/if}} {{/zcl_struct_items_by_struct_and_cluster_name}} {{else}} {{#if_is_strongly_typed_chip_enum type}} diff --git a/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt b/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt index 79d38dc87f3c91..8c2cee7f23c7c9 100644 --- a/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt @@ -46,7 +46,9 @@ {{else}} {{#if_is_struct type}} {{#zcl_struct_items_by_struct_and_cluster_name type cluster}} + {{#if (isSupported (asUpperCamelCase ../cluster preserveAcronyms=true) struct=(asUpperCamelCase ../type preserveAcronyms=true) structField=(asStructPropertyName label))}} {{>encode_value target=(concat ../target "." (asLowerCamelCase label)) source=(concat ../source "." (asStructPropertyName label)) cluster=../cluster errorCode=../errorCode depth=(incrementDepth ../depth)}} + {{/if}} {{/zcl_struct_items_by_struct_and_cluster_name}} {{else}} {{#if_is_strongly_typed_chip_enum type}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 4e92c0b02e92ba..6b7b60fc89dfd0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -1802,6 +1802,45 @@ static BOOL AttributeIsSpecifiedInModeSelectCluster(AttributeId aAttributeId) } } } +static BOOL AttributeIsSpecifiedInWasherControlsCluster(AttributeId aAttributeId) +{ + using namespace Clusters::WasherControls; + switch (aAttributeId) { + case Attributes::SpinSpeeds::Id: { + return YES; + } + case Attributes::SpinSpeedCurrent::Id: { + return YES; + } + case Attributes::NumberOfRinses::Id: { + return YES; + } + case Attributes::MaxRinses::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} static BOOL AttributeIsSpecifiedInTemperatureControlCluster(AttributeId aAttributeId) { using namespace Clusters::TemperatureControl; @@ -1818,7 +1857,7 @@ static BOOL AttributeIsSpecifiedInTemperatureControlCluster(AttributeId aAttribu case Attributes::Step::Id: { return YES; } - case Attributes::CurrentTemperatureLevelIndex::Id: { + case Attributes::SelectedTemperatureLevel::Id: { return YES; } case Attributes::SupportedTemperatureLevels::Id: { @@ -1854,9 +1893,6 @@ static BOOL AttributeIsSpecifiedInRefrigeratorAlarmCluster(AttributeId aAttribut case Attributes::Mask::Id: { return YES; } - case Attributes::Latch::Id: { - return YES; - } case Attributes::State::Id: { return YES; } @@ -7038,6 +7074,9 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::ModeSelect::Id: { return AttributeIsSpecifiedInModeSelectCluster(aAttributeId); } + case Clusters::WasherControls::Id: { + return AttributeIsSpecifiedInWasherControlsCluster(aAttributeId); + } case Clusters::TemperatureControl::Id: { return AttributeIsSpecifiedInTemperatureControlCluster(aAttributeId); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index ccf803946f8db9..4d0b099328cbb1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -9048,12 +9048,16 @@ static id _Nullable DecodeAttributeValueForModeSelectCluster( newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.semanticTags.begin(); + auto iter_2 = entry_0.modeTags.begin(); while (iter_2.Next()) { auto & entry_2 = iter_2.GetValue(); - MTRModeSelectClusterSemanticTagStruct * newElement_2; - newElement_2 = [MTRModeSelectClusterSemanticTagStruct new]; - newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode)]; + MTRModeSelectClusterModeTagStruct * newElement_2; + newElement_2 = [MTRModeSelectClusterModeTagStruct new]; + if (entry_2.mfgCode.HasValue()) { + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; + } else { + newElement_2.mfgCode = nil; + } newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; [array_2 addObject:newElement_2]; } @@ -9062,7 +9066,7 @@ static id _Nullable DecodeAttributeValueForModeSelectCluster( *aError = err; return nil; } - newElement_0.semanticTags = array_2; + newElement_0.modeTags = array_2; } [array_0 addObject:newElement_0]; } @@ -9250,6 +9254,217 @@ static id _Nullable DecodeAttributeValueForModeSelectCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } +static id _Nullable DecodeAttributeValueForWasherControlsCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::WasherControls; + switch (aAttributeId) { + case Attributes::SpinSpeeds::Id: { + using TypeInfo = Attributes::SpinSpeeds::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::SpinSpeedCurrent::Id: { + using TypeInfo = Attributes::SpinSpeedCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::NumberOfRinses::Id: { + using TypeInfo = Attributes::NumberOfRinses::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::MaxRinses::Id: { + using TypeInfo = Attributes::MaxRinses::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} static id _Nullable DecodeAttributeValueForTemperatureControlCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { @@ -9299,8 +9514,8 @@ static id _Nullable DecodeAttributeValueForTemperatureControlCluster( value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::CurrentTemperatureLevelIndex::Id: { - using TypeInfo = Attributes::CurrentTemperatureLevelIndex::TypeInfo; + case Attributes::SelectedTemperatureLevel::Id: { + using TypeInfo = Attributes::SelectedTemperatureLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -9323,15 +9538,13 @@ static id _Nullable DecodeAttributeValueForTemperatureControlCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRTemperatureControlClusterTemperatureLevelStruct * newElement_0; - newElement_0 = [MTRTemperatureControlClusterTemperatureLevelStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; *aError = err; return nil; } - newElement_0.temperatureLevel = [NSNumber numberWithUnsignedChar:entry_0.temperatureLevel]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9493,17 +9706,6 @@ static id _Nullable DecodeAttributeValueForRefrigeratorAlarmCluster( value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } - case Attributes::Latch::Id: { - using TypeInfo = Attributes::Latch::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; - return value; - } case Attributes::State::Id: { using TypeInfo = Attributes::State::TypeInfo; TypeInfo::DecodableType cppValue; @@ -33392,6 +33594,9 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::ModeSelect::Id: { return DecodeAttributeValueForModeSelectCluster(aPath.mAttributeId, aReader, aError); } + case Clusters::WasherControls::Id: { + return DecodeAttributeValueForWasherControlsCluster(aPath.mAttributeId, aReader, aError); + } case Clusters::TemperatureControl::Id: { return DecodeAttributeValueForTemperatureControlCluster(aPath.mAttributeId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 92b8e8ea346ad5..f5f668af05be77 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -7226,10 +7226,13 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * * Return the list of Group Key Sets associated with the accessing fabric */ -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)keySetReadAllIndicesWithCompletion: + (void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion @@ -7719,8 +7722,11 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) /** * Command ChangeToMode * - * On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL - * set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. + * If the NewMode field doesn't match the Mode field in an entry of the SupportedModes list the server SHALL respond with an + INVALID_COMMAND status response. If the NewMode field matches the Mode field in an entry of the SupportedModes list but the device + is unable to transition as requested, the server SHALL respond with a FAILURE status response. If the NewMode field matches the + Mode field in an entry of the SupportedModes list and the device is able to transition as requested the server SHALL set the + CurrentMode attribute to the NewMode value and SHALL respond with a SUCCESS status response. */ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -7894,6 +7900,154 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Washer Controls + * + * This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such + * as a washing machine. + */ +MTR_NEWLY_AVAILABLE +@interface MTRBaseClusterWasherControls : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + +- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + +- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeMaxRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeMaxRinsesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeMaxRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + /** * Cluster Temperature Control * @@ -7962,19 +8116,17 @@ MTR_NEWLY_AVAILABLE completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentTemperatureLevelIndexWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeCurrentTemperatureLevelIndexWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCurrentTemperatureLevelIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; @@ -8077,20 +8229,8 @@ MTR_NEWLY_AVAILABLE endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -/** - * Command Reset - * - * Reset alarm - */ -- (void)resetWithParams:(MTRRefrigeratorAlarmClusterResetParams *)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeMaskWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8101,18 +8241,6 @@ MTR_NEWLY_AVAILABLE completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams *)params @@ -31572,12 +31700,21 @@ typedef NS_ENUM(uint8_t, MTRGroupKeyManagementGroupKeySecurityPolicy) { } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { - MTRModeSelectFeatureDEPONOFF API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRModeSelectFeatureOnOff MTR_NEWLY_AVAILABLE = 0x1, + MTRModeSelectFeatureDEPONOFF API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRModeSelectFeatureOnOff") + = 0x1, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRWasherControlsFeature) { + MTRWasherControlsFeatureSpin MTR_NEWLY_AVAILABLE = 0x1, + MTRWasherControlsFeatureRinse MTR_NEWLY_AVAILABLE = 0x2, +} MTR_NEWLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { MTRTemperatureControlFeatureTemperatureNumber MTR_NEWLY_AVAILABLE = 0x1, MTRTemperatureControlFeatureTemperatureLevel MTR_NEWLY_AVAILABLE = 0x2, + MTRTemperatureControlFeatureTemperatureStep MTR_NEWLY_AVAILABLE = 0x4, } MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAlarmAlarmMap) { @@ -43691,7 +43828,7 @@ typedef NS_ENUM(uint8_t, MTRFaultInjectionFaultType) { completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED( "Please use keySetRemoveWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use keySetReadAllIndicesWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 0a93d5662fc3c7..a4acf1dfc0071e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -43825,7 +43825,12 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * std::move(*bridge).DispatchAction(self.device); } -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params +- (void)keySetReadAllIndicesWithCompletion: + (void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self keySetReadAllIndicesWithParams:nil completion:completion]; +} +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion { @@ -43852,28 +43857,6 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.groupKeySetIDs.count != 0) { - auto * listHolder_0 = new ListHolder(params.groupKeySetIDs.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.groupKeySetIDs.count; ++i_0) { - if (![params.groupKeySetIDs[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.groupKeySetIDs[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedShortValue; - } - request.groupKeySetIDs = ListType_0(listHolder_0->mList, params.groupKeySetIDs.count); - } else { - request.groupKeySetIDs = ListType_0(); - } - } return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -44406,7 +44389,7 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * { [self keySetRemoveWithParams:params completion:completionHandler]; } -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { @@ -47851,7 +47834,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterTemperatureControl +@implementation MTRBaseClusterWasherControls - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -47866,83 +47849,121 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WasherControls::Attributes::SpinSpeeds::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WasherControls::Attributes::SpinSpeeds::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRWasherControlsSpinSpeedsListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(WasherControlsSpinSpeedsListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WasherControls::Attributes::SpinSpeeds::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TemperatureControl::Commands::SetTemperature::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - 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.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.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; - } + + ListFreer listFreer; + using TypeInfo = WasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - 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()); -} - -- (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; + using TypeInfo = WasherControls::Attributes::SpinSpeedCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -47957,35 +47978,77 @@ + (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WasherControls::Attributes::NumberOfRinses::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = WasherControls::Attributes::NumberOfRinses::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WasherControls::Attributes::NumberOfRinses::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; + using TypeInfo = WasherControls::Attributes::NumberOfRinses::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48000,35 +48063,35 @@ + (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheCo }); } -- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WasherControls::Attributes::MaxRinses::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxRinsesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WasherControls::Attributes::MaxRinses::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; + using TypeInfo = WasherControls::Attributes::MaxRinses::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48043,35 +48106,37 @@ + (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheCo }); } -- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WasherControls::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = WasherControls::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(WasherControlsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; + using TypeInfo = WasherControls::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48086,39 +48151,493 @@ + (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *) }); } -- (void)readAttributeCurrentTemperatureLevelIndexWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::CurrentTemperatureLevelIndex::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WasherControls::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeCurrentTemperatureLevelIndexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureControl::Attributes::CurrentTemperatureLevelIndex::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WasherControls::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(WasherControlsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WasherControls::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WasherControls::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WasherControls::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRWasherControlsEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(WasherControlsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WasherControls::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WasherControls::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WasherControls::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRWasherControlsAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(WasherControlsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WasherControls::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WasherControls::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WasherControls::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WasherControls::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WasherControls::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WasherControls::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WasherControls::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterTemperatureControl + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(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 (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + 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(self.device); +} + +- (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + 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()); +} + +- (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + 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()); +} + +- (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeCurrentTemperatureLevelIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + 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()); +} + +- (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + 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()); +} + +- (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + 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()); +} + +- (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::CurrentTemperatureLevelIndex::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48460,46 +48979,6 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)resetWithParams:(MTRRefrigeratorAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RefrigeratorAlarm::Commands::Reset::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - 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); - if (params.mask != nil) { - auto & definedValue_0 = request.mask.Emplace(); - definedValue_0 = static_cast>(params.mask.unsignedIntValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -48508,43 +48987,6 @@ - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NS params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeMaskWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeMaskWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedIntValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -48580,49 +49022,6 @@ + (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *) }); } -- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAlarm::Attributes::Latch::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RefrigeratorAlarm::Attributes::Latch::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRRefrigeratorAlarmLatchAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(RefrigeratorAlarmLatchAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RefrigeratorAlarm::Attributes::Latch::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h index a5397af42c3e46..890e9f718a2b5b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h @@ -200,6 +200,11 @@ @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end +@interface MTRBaseClusterWasherControls () +@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; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index d546e766e6dfc0..91f1dde245c6fe 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -1591,10 +1591,18 @@ typedef void (*ModeSelectEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WasherControlsSpinSpeedsListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*WasherControlsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WasherControlsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WasherControlsEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*WasherControlsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlSupportedTemperatureLevelsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> & data); + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlAcceptedCommandListListAttributeCallback)( @@ -1604,7 +1612,6 @@ typedef void (*TemperatureControlEventListListAttributeCallback)(void * context, typedef void (*TemperatureControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RefrigeratorAlarmMaskAttributeCallback)(void *, chip::BitMask); -typedef void (*RefrigeratorAlarmLatchAttributeCallback)(void *, chip::BitMask); typedef void (*RefrigeratorAlarmStateAttributeCallback)(void *, chip::BitMask); typedef void (*RefrigeratorAlarmGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); @@ -9424,6 +9431,168 @@ class MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRWasherControlsSpinSpeedsListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRWasherControlsSpinSpeedsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRWasherControlsSpinSpeedsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRWasherControlsSpinSpeedsListAttributeCallbackSubscriptionBridge + : public MTRWasherControlsSpinSpeedsListAttributeCallbackBridge +{ +public: + MTRWasherControlsSpinSpeedsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWasherControlsSpinSpeedsListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRWasherControlsSpinSpeedsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWasherControlsSpinSpeedsListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRWasherControlsGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge +{ +public: + MTRWasherControlsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRWasherControlsAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRWasherControlsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRWasherControlsEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRWasherControlsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRWasherControlsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRWasherControlsEventListListAttributeCallbackSubscriptionBridge + : public MTRWasherControlsEventListListAttributeCallbackBridge +{ +public: + MTRWasherControlsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWasherControlsEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRWasherControlsEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWasherControlsEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRWasherControlsAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRWasherControlsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRWasherControlsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRWasherControlsAttributeListListAttributeCallbackSubscriptionBridge + : public MTRWasherControlsAttributeListListAttributeCallbackBridge +{ +public: + MTRWasherControlsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWasherControlsAttributeListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRWasherControlsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWasherControlsAttributeListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge : public MTRCallbackBridge { @@ -9435,9 +9604,7 @@ class MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; class MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackSubscriptionBridge @@ -9621,36 +9788,6 @@ class MTRRefrigeratorAlarmMaskAttributeCallbackSubscriptionBridge : public MTRRe MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRefrigeratorAlarmLatchAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRRefrigeratorAlarmLatchAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRRefrigeratorAlarmLatchAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::BitMask value); -}; - -class MTRRefrigeratorAlarmLatchAttributeCallbackSubscriptionBridge : public MTRRefrigeratorAlarmLatchAttributeCallbackBridge -{ -public: - MTRRefrigeratorAlarmLatchAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRefrigeratorAlarmLatchAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRRefrigeratorAlarmLatchAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRefrigeratorAlarmLatchAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRRefrigeratorAlarmStateAttributeCallbackBridge : public MTRCallbackBridge { public: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 7198986eee0a05..c44398a8f6f64a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -8010,12 +8010,16 @@ newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.semanticTags.begin(); + auto iter_2 = entry_0.modeTags.begin(); while (iter_2.Next()) { auto & entry_2 = iter_2.GetValue(); - MTRModeSelectClusterSemanticTagStruct * newElement_2; - newElement_2 = [MTRModeSelectClusterSemanticTagStruct new]; - newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode)]; + MTRModeSelectClusterModeTagStruct * newElement_2; + newElement_2 = [MTRModeSelectClusterModeTagStruct new]; + if (entry_2.mfgCode.HasValue()) { + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; + } else { + newElement_2.mfgCode = nil; + } newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; [array_2 addObject:newElement_2]; } @@ -8024,7 +8028,7 @@ OnFailureFn(context, err); return; } - newElement_0.semanticTags = array_2; + newElement_0.modeTags = array_2; } [array_0 addObject:newElement_0]; } @@ -8205,9 +8209,8 @@ } } -void MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> & value) +void MTRWasherControlsSpinSpeedsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8215,15 +8218,13 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRTemperatureControlClusterTemperatureLevelStruct * newElement_0; - newElement_0 = [MTRTemperatureControlClusterTemperatureLevelStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; OnFailureFn(context, err); return; } - newElement_0.temperatureLevel = [NSNumber numberWithUnsignedChar:entry_0.temperatureLevel]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -8236,7 +8237,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWasherControlsSpinSpeedsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8251,7 +8252,7 @@ } } -void MTRTemperatureControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8274,7 +8275,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWasherControlsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8289,7 +8290,7 @@ } } -void MTRTemperatureControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8312,7 +8313,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWasherControlsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8327,7 +8328,7 @@ } } -void MTRTemperatureControlEventListListAttributeCallbackBridge::OnSuccessFn( +void MTRWasherControlsEventListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8350,7 +8351,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWasherControlsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8365,7 +8366,7 @@ } } -void MTRTemperatureControlAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRWasherControlsAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8388,7 +8389,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWasherControlsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8403,15 +8404,187 @@ } } -void MTRRefrigeratorAlarmMaskAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedInt:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRRefrigeratorAlarmMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRTemperatureControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRTemperatureControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRTemperatureControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRTemperatureControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRTemperatureControlEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRTemperatureControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRTemperatureControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRTemperatureControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8426,7 +8599,7 @@ } } -void MTRRefrigeratorAlarmLatchAttributeCallbackBridge::OnSuccessFn( +void MTRRefrigeratorAlarmMaskAttributeCallbackBridge::OnSuccessFn( void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; @@ -8434,7 +8607,7 @@ DispatchSuccess(context, objCValue); }; -void MTRRefrigeratorAlarmLatchAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRRefrigeratorAlarmMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index aa7ddfac2bde8f..a478ff5d4917d8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -276,6 +276,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeProxyValidID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000044, MTRClusterIDTypeBooleanStateID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000045, MTRClusterIDTypeModeSelectID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000050, + MTRClusterIDTypeWasherControlsID MTR_NEWLY_AVAILABLE = 0x00000053, MTRClusterIDTypeTemperatureControlID MTR_NEWLY_AVAILABLE = 0x00000056, MTRClusterIDTypeRefrigeratorAlarmID MTR_NEWLY_AVAILABLE = 0x00000057, MTRClusterIDTypeAirQualityID MTR_NEWLY_AVAILABLE = 0x0000005B, @@ -3768,12 +3769,29 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster WasherControls attributes + MTRAttributeIDTypeClusterWasherControlsAttributeSpinSpeedsID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterWasherControlsAttributeSpinSpeedCurrentID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterWasherControlsAttributeNumberOfRinsesID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterWasherControlsAttributeMaxRinsesID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterWasherControlsAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterWasherControlsAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterWasherControlsAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterWasherControlsAttributeAttributeListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterWasherControlsAttributeFeatureMapID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterWasherControlsAttributeClusterRevisionID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster TemperatureControl attributes MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID MTR_NEWLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID MTR_NEWLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID MTR_NEWLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterTemperatureControlAttributeStepID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterTemperatureControlAttributeCurrentTemperatureLevelIndexID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID MTR_NEWLY_AVAILABLE = 0x00000004, MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID MTR_NEWLY_AVAILABLE = 0x00000005, MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, @@ -3790,7 +3808,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster RefrigeratorAlarm attributes MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeLatchID MTR_NEWLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID MTR_NEWLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, @@ -10189,9 +10206,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { // Cluster TemperatureControl commands MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID MTR_NEWLY_AVAILABLE = 0x00000000, - // Cluster RefrigeratorAlarm commands - MTRCommandIDTypeClusterRefrigeratorAlarmCommandResetID MTR_NEWLY_AVAILABLE = 0x00000000, - // Cluster SmokeCOAlarm commands MTRCommandIDTypeClusterSmokeCOAlarmCommandSelfTestRequestID MTR_NEWLY_AVAILABLE = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 277d4d1b8390cd..7cac750f6130bf 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -2560,12 +2560,17 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)keySetReadAllIndicesWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion: + (void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2798,6 +2803,53 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Washer Controls + * This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, + * such as a washing machine. + */ +MTR_NEWLY_AVAILABLE +@interface MTRClusterWasherControls : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeMaxRinsesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + /** * Cluster Temperature Control * Attributes and commands for configuring the temperature control, and reporting temperature. @@ -2822,7 +2874,7 @@ MTR_NEWLY_AVAILABLE - (NSDictionary *)readAttributeStepWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary *)readAttributeCurrentTemperatureLevelIndexWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params @@ -2856,19 +2908,7 @@ MTR_NEWLY_AVAILABLE endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)resetWithParams:(MTRRefrigeratorAlarmClusterResetParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (void)writeAttributeMaskWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; -- (void)writeAttributeMaskWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; @@ -10887,7 +10927,7 @@ MTR_DEPRECATED("Please use MTRClusterUnitTesting", ios(16.1, 16.4), macos(13.0, completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use keySetRemoveWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 37861d9b42dd98..d0a2a2fa99e862 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -12151,7 +12151,18 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * } } -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params +- (void)keySetReadAllIndicesWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion: + (void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + [self keySetReadAllIndicesWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completion]; +} +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, @@ -12200,28 +12211,6 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.groupKeySetIDs.count != 0) { - auto * listHolder_0 = new ListHolder(params.groupKeySetIDs.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.groupKeySetIDs.count; ++i_0) { - if (![params.groupKeySetIDs[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.groupKeySetIDs[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedShortValue; - } - request.groupKeySetIDs = ListType_0(listHolder_0->mList, params.groupKeySetIDs.count); - } else { - request.groupKeySetIDs = ListType_0(); - } - } return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -12384,7 +12373,7 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; } -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, @@ -12905,6 +12894,141 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params } @end +@implementation MTRClusterWasherControls + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; +} + +- (NSDictionary *)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeSpinSpeedsID) + params:params]; +} + +- (NSDictionary *)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeSpinSpeedCurrentID) + params:params]; +} + +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSpinSpeedCurrentWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeSpinSpeedCurrentID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary *)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeNumberOfRinsesID) + params:params]; +} + +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeNumberOfRinsesWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeNumberOfRinsesID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary *)readAttributeMaxRinsesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeMaxRinsesID) + params:params]; +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeGeneratedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeAcceptedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeEventListID) + params:params]; +} + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeAttributeListID) + params:params]; +} + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeClusterRevisionID) + params:params]; +} + +@end + @implementation MTRClusterTemperatureControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue @@ -13029,13 +13153,13 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara params:params]; } -- (NSDictionary *)readAttributeCurrentTemperatureLevelIndexWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeCurrentTemperatureLevelIndexID) - params:params]; + return + [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTemperatureControlID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) + params:params]; } - (NSDictionary *)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params @@ -13112,78 +13236,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi return self; } -- (void)resetWithParams:(MTRRefrigeratorAlarmClusterResetParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRefrigeratorAlarmID, - (unsigned int) MTRCommandIDTypeClusterRefrigeratorAlarmCommandResetID]; - // 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; - RefrigeratorAlarm::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); - if (params.mask != nil) { - auto & definedValue_0 = request.mask.Emplace(); - definedValue_0 = static_cast>(params.mask.unsignedIntValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } -} - - (NSDictionary *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -13192,33 +13244,6 @@ - (void)resetWithParams:(MTRRefrigeratorAlarmClusterResetParams *)params params:params]; } -- (void)writeAttributeMaskWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeMaskWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeMaskWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeLatchID) - params:params]; -} - - (NSDictionary *)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h index d6a12b25f05ca7..1b2d9bbecbebfa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h @@ -201,6 +201,11 @@ @property (nonatomic, readonly) MTRDevice * device; @end +@interface MTRClusterWasherControls () +@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; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 24c4e750f138da..14ba07c1913e38 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -3982,8 +3982,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRGroupKeyManagementClusterKeySetReadAllIndicesParams : NSObject - -@property (nonatomic, copy) NSArray * _Nonnull groupKeySetIDs API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4109,38 +4107,6 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE -@interface MTRRefrigeratorAlarmClusterResetParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull alarms MTR_NEWLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable mask MTR_NEWLY_AVAILABLE; -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - MTR_NEWLY_AVAILABLE @interface MTRSmokeCOAlarmClusterSelfTestRequestParams : NSObject /** diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 0f7cc9d3233ebd..66c3b15412707c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -16,6 +16,7 @@ */ #import "MTRCommandPayloadsObjc.h" +#import "MTRBackwardsCompatShims.h" #import "MTRBaseDevice_Internal.h" #import "MTRCommandPayloads_Internal.h" #import "MTRError_Internal.h" @@ -6297,8 +6298,6 @@ @implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesParams - (instancetype)init { if (self = [super init]) { - - _groupKeySetIDs = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6309,7 +6308,6 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; - other.groupKeySetIDs = self.groupKeySetIDs; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6318,8 +6316,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: groupKeySetIDs:%@; >", NSStringFromClass([self class]), _groupKeySetIDs]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @@ -6482,40 +6479,6 @@ - (NSString *)description return descriptionString; } -@end -@implementation MTRRefrigeratorAlarmClusterResetParams -- (instancetype)init -{ - if (self = [super init]) { - - _alarms = @(0); - - _mask = nil; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRRefrigeratorAlarmClusterResetParams alloc] init]; - - other.alarms = self.alarms; - other.mask = self.mask; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: alarms:%@; mask:%@; >", NSStringFromClass([self class]), _alarms, _mask]; - return descriptionString; -} - @end @implementation MTRSmokeCOAlarmClusterSelfTestRequestParams - (instancetype)init @@ -12319,179 +12282,180 @@ @implementation MTRUnitTestingClusterTestStructArrayArgumentResponseParams (Inte - (CHIP_ERROR)_setFieldsFromDecodableStruct: (const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType &)decodableStruct { - { { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.arg1.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRUnitTestingClusterNestedStructList * newElement_0; - newElement_0 = [MTRUnitTestingClusterNestedStructList new]; - newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a]; - newElement_0.b = [NSNumber numberWithBool:entry_0.b]; - newElement_0.c = [MTRUnitTestingClusterSimpleStruct new]; - newElement_0.c.a = [NSNumber numberWithUnsignedChar:entry_0.c.a]; - newElement_0.c.b = [NSNumber numberWithBool:entry_0.c.b]; - newElement_0.c.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c.c)]; - newElement_0.c.d = AsData(entry_0.c.d); - newElement_0.c.e = AsString(entry_0.c.e); - if (newElement_0.c.e == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - newElement_0.c.f = [NSNumber numberWithUnsignedChar:entry_0.c.f.Raw()]; - newElement_0.c.g = [NSNumber numberWithFloat:entry_0.c.g]; - newElement_0.c.h = [NSNumber numberWithDouble:entry_0.c.h]; + { { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.d.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - MTRUnitTestingClusterSimpleStruct * newElement_2; - newElement_2 = [MTRUnitTestingClusterSimpleStruct new]; - newElement_2.a = [NSNumber numberWithUnsignedChar:entry_2.a]; - newElement_2.b = [NSNumber numberWithBool:entry_2.b]; - newElement_2.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.c)]; - newElement_2.d = AsData(entry_2.d); - newElement_2.e = AsString(entry_2.e); - if (newElement_2.e == nil) { + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.arg1.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRUnitTestingClusterNestedStructList * newElement_0; + newElement_0 = [MTRUnitTestingClusterNestedStructList new]; + newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a]; + newElement_0.b = [NSNumber numberWithBool:entry_0.b]; + newElement_0.c = [MTRUnitTestingClusterSimpleStruct new]; + newElement_0.c.a = [NSNumber numberWithUnsignedChar:entry_0.c.a]; + newElement_0.c.b = [NSNumber numberWithBool:entry_0.c.b]; + newElement_0.c.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c.c)]; + newElement_0.c.d = AsData(entry_0.c.d); + newElement_0.c.e = AsString(entry_0.c.e); + if (newElement_0.c.e == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; return err; } - newElement_2.f = [NSNumber numberWithUnsignedChar:entry_2.f.Raw()]; - newElement_2.g = [NSNumber numberWithFloat:entry_2.g]; - newElement_2.h = [NSNumber numberWithDouble:entry_2.h]; - [array_2 addObject:newElement_2]; + newElement_0.c.f = [NSNumber numberWithUnsignedChar:entry_0.c.f.Raw()]; + newElement_0.c.g = [NSNumber numberWithFloat:entry_0.c.g]; + newElement_0.c.h = [NSNumber numberWithDouble:entry_0.c.h]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.d.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRUnitTestingClusterSimpleStruct * newElement_2; + newElement_2 = [MTRUnitTestingClusterSimpleStruct new]; + newElement_2.a = [NSNumber numberWithUnsignedChar:entry_2.a]; + newElement_2.b = [NSNumber numberWithBool:entry_2.b]; + newElement_2.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.c)]; + newElement_2.d = AsData(entry_2.d); + newElement_2.e = AsString(entry_2.e); + if (newElement_2.e == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + newElement_2.f = [NSNumber numberWithUnsignedChar:entry_2.f.Raw()]; + newElement_2.g = [NSNumber numberWithFloat:entry_2.g]; + newElement_2.h = [NSNumber numberWithDouble:entry_2.h]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.d = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.e.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedInt:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.e = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.f.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSData * newElement_2; + newElement_2 = AsData(entry_2); + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.f = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.g.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedChar:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.g = array_2; + } + [array_0 addObject:newElement_0]; } - CHIP_ERROR err = iter_2.GetStatus(); + CHIP_ERROR err = iter_0.GetStatus(); if (err != CHIP_NO_ERROR) { return err; } - newElement_0.d = array_2; + self.arg1 = array_0; } + } + { { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.e.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedInt:entry_2]; - [array_2 addObject:newElement_2]; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.arg2.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRUnitTestingClusterSimpleStruct * newElement_0; + newElement_0 = [MTRUnitTestingClusterSimpleStruct new]; + newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a]; + newElement_0.b = [NSNumber numberWithBool:entry_0.b]; + newElement_0.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c)]; + newElement_0.d = AsData(entry_0.d); + newElement_0.e = AsString(entry_0.e); + if (newElement_0.e == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + newElement_0.f = [NSNumber numberWithUnsignedChar:entry_0.f.Raw()]; + newElement_0.g = [NSNumber numberWithFloat:entry_0.g]; + newElement_0.h = [NSNumber numberWithDouble:entry_0.h]; + [array_0 addObject:newElement_0]; } - CHIP_ERROR err = iter_2.GetStatus(); + CHIP_ERROR err = iter_0.GetStatus(); if (err != CHIP_NO_ERROR) { return err; } - newElement_0.e = array_2; + self.arg2 = array_0; } + } + { { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.f.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSData * newElement_2; - newElement_2 = AsData(entry_2); - [array_2 addObject:newElement_2]; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.arg3.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; } - CHIP_ERROR err = iter_2.GetStatus(); + CHIP_ERROR err = iter_0.GetStatus(); if (err != CHIP_NO_ERROR) { return err; } - newElement_0.f = array_2; + self.arg3 = array_0; } + } + { { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.g.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedChar:entry_2]; - [array_2 addObject:newElement_2]; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.arg4.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithBool:entry_0]; + [array_0 addObject:newElement_0]; } - CHIP_ERROR err = iter_2.GetStatus(); + CHIP_ERROR err = iter_0.GetStatus(); if (err != CHIP_NO_ERROR) { return err; } - newElement_0.g = array_2; + self.arg4 = array_0; } - [array_0 addObject:newElement_0]; } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.arg1 = array_0; -} -} -{ - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.arg2.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRUnitTestingClusterSimpleStruct * newElement_0; - newElement_0 = [MTRUnitTestingClusterSimpleStruct new]; - newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a]; - newElement_0.b = [NSNumber numberWithBool:entry_0.b]; - newElement_0.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c)]; - newElement_0.d = AsData(entry_0.d); - newElement_0.e = AsString(entry_0.e); - if (newElement_0.e == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - newElement_0.f = [NSNumber numberWithUnsignedChar:entry_0.f.Raw()]; - newElement_0.g = [NSNumber numberWithFloat:entry_0.g]; - newElement_0.h = [NSNumber numberWithDouble:entry_0.h]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.arg2 = array_0; - } -} -{ - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.arg3.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.arg3 = array_0; + { + self.arg5 = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.arg5)]; } -} -{ - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.arg4.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithBool:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.arg4 = array_0; + { + self.arg6 = [NSNumber numberWithBool:decodableStruct.arg6]; } -} -{ - self.arg5 = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.arg5)]; -} -{ - self.arg6 = [NSNumber numberWithBool:decodableStruct.arg6]; -} -return CHIP_NO_ERROR; + return CHIP_NO_ERROR; } @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 6780e58cd97afd..7b83228a2c0218 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -1554,6 +1554,18 @@ static id _Nullable DecodeEventPayloadForModeSelectCluster(EventId aEventId, TLV *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } +static id _Nullable DecodeEventPayloadForWasherControlsCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::WasherControls; + switch (aEventId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} static id _Nullable DecodeEventPayloadForTemperatureControlCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::TemperatureControl; @@ -3500,6 +3512,9 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::ModeSelect::Id: { return DecodeEventPayloadForModeSelectCluster(aPath.mEventId, aReader, aError); } + case Clusters::WasherControls::Id: { + return DecodeEventPayloadForWasherControlsCluster(aPath.mEventId, aReader, aError); + } case Clusters::TemperatureControl::Id: { return DecodeEventPayloadForTemperatureControlCluster(aPath.mEventId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 5bac17ec0460ad..2631ce6538c68c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -687,27 +687,23 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nonnull stateValue API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTRModeSelectClusterSemanticTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull mfgCode API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull value API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +MTR_NEWLY_AVAILABLE +@interface MTRModeSelectClusterModeTagStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; @end MTR_DEPRECATED( - "Please use MTRModeSelectClusterSemanticTagStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTRModeSelectClusterSemanticTag : MTRModeSelectClusterSemanticTagStruct + "Please use MTRModeSelectClusterModeTagStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTRModeSelectClusterSemanticTag : MTRModeSelectClusterModeTagStruct @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRModeSelectClusterModeOptionStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull label API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nonnull mode API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSArray * _Nonnull semanticTags API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@end - -MTR_NEWLY_AVAILABLE -@interface MTRTemperatureControlClusterTemperatureLevelStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull temperatureLevel MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull semanticTags API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use modeTags"); @end MTR_NEWLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index d30dc53a11a5ec..1cc982890290bd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -2618,12 +2618,12 @@ - (NSString *)description @end -@implementation MTRModeSelectClusterSemanticTagStruct +@implementation MTRModeSelectClusterModeTagStruct - (instancetype)init { if (self = [super init]) { - _mfgCode = @(0); + _mfgCode = nil; _value = @(0); } @@ -2632,7 +2632,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRModeSelectClusterSemanticTagStruct alloc] init]; + auto other = [[MTRModeSelectClusterModeTagStruct alloc] init]; other.mfgCode = self.mfgCode; other.value = self.value; @@ -2649,7 +2649,7 @@ - (NSString *)description @end -@implementation MTRModeSelectClusterSemanticTag : MTRModeSelectClusterSemanticTagStruct +@implementation MTRModeSelectClusterSemanticTag : MTRModeSelectClusterModeTagStruct @end @implementation MTRModeSelectClusterModeOptionStruct @@ -2661,7 +2661,7 @@ - (instancetype)init _mode = @(0); - _semanticTags = [NSArray array]; + _modeTags = [NSArray array]; } return self; } @@ -2672,47 +2672,26 @@ - (id)copyWithZone:(NSZone * _Nullable)zone other.label = self.label; other.mode = self.mode; - other.semanticTags = self.semanticTags; + other.modeTags = self.modeTags; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; mode:%@; semanticTags:%@; >", - NSStringFromClass([self class]), _label, _mode, _semanticTags]; + NSString * descriptionString = [NSString + stringWithFormat:@"<%@: label:%@; mode:%@; modeTags:%@; >", NSStringFromClass([self class]), _label, _mode, _modeTags]; return descriptionString; } -@end - -@implementation MTRTemperatureControlClusterTemperatureLevelStruct -- (instancetype)init +- (void)setSemanticTags:(NSArray * _Nonnull)semanticTags { - if (self = [super init]) { - - _label = @""; - - _temperatureLevel = @(0); - } - return self; + self.modeTags = semanticTags; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (NSArray * _Nonnull)semanticTags { - auto other = [[MTRTemperatureControlClusterTemperatureLevelStruct alloc] init]; - - other.label = self.label; - other.temperatureLevel = self.temperatureLevel; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString - stringWithFormat:@"<%@: label:%@; temperatureLevel:%@; >", NSStringFromClass([self class]), _label, _temperatureLevel]; - return descriptionString; + return self.modeTags; } @end diff --git a/src/darwin/Framework/CHIPTests/MTRBackwardsCompatTests.m b/src/darwin/Framework/CHIPTests/MTRBackwardsCompatTests.m index 1c9833ab4fe3fa..3db07720954f17 100644 --- a/src/darwin/Framework/CHIPTests/MTRBackwardsCompatTests.m +++ b/src/darwin/Framework/CHIPTests/MTRBackwardsCompatTests.m @@ -1196,6 +1196,22 @@ - (void)test046_MTRThreadOperationalDataset CHECK_RETURN_TYPE(sig, NSData *); } +- (void)test047_MTRGroupKeyManagementClusterKeySetReadAllIndicesParams +{ + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; + CHECK_PROPERTY(params, groupKeySetIDs, setGroupKeySetIDs, NSArray *); + + params.groupKeySetIDs = @[ @(16) ]; + XCTAssertEqualObjects(params.groupKeySetIDs, @[ @(16) ]); +} + +- (void)test048_MTRModeSelectClusterSemanticTagStruct +{ + __auto_type * obj = [[MTRModeSelectClusterSemanticTagStruct alloc] init]; + CHECK_PROPERTY(obj, mfgCode, setMfgCode, NSNumber *); + CHECK_PROPERTY(obj, value, setValue, NSNumber *); +} + - (void)test999_TearDown { ResetCommissionee(GetConnectedDevice(), dispatch_get_main_queue(), self, kTimeoutInSeconds); diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 07999e06cafeef..eb334429336849 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -96,10 +96,11 @@ - (void)controller:(MTRDeviceController *)controller commissioningSessionEstabli { XCTAssertEqual(error.code, 0); + __auto_type * params = [[MTRCommissioningParameters alloc] init]; + params.countryCode = @("au"); + NSError * commissionError = nil; - [sController commissionNodeWithID:@(kDeviceId) - commissioningParams:[[MTRCommissioningParameters alloc] init] - error:&commissionError]; + [sController commissionNodeWithID:@(kDeviceId) commissioningParams:params error:&commissionError]; XCTAssertNil(commissionError); // Keep waiting for controller:commissioningComplete: @@ -2350,6 +2351,25 @@ - (void)test025_SubscribeMultipleEvents [self waitForExpectations:@[ startupEventExpectation, expectation ] timeout:kTimeoutInSeconds]; } +- (void)test026_LocationAttribute +{ + __auto_type * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * expectation = [self expectationWithDescription:@"read Basic Information Location attribute"]; + + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:queue]; + [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + XCTAssertNil(error); + + // Matches what we passed in during commissioning. + XCTAssertEqualObjects(value, @"au"); + [expectation fulfill]; + }]; + + [self waitForExpectations:@[ expectation ] timeout:kTimeoutInSeconds]; +} + - (void)test900_SubscribeAllAttributes { MTRBaseDevice * device = GetConnectedDevice(); diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index d93ddc7cc9b841..7ea9959fd9fab4 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -126,6 +126,7 @@ 3DFCB3292966684500332B35 /* MTRCertificateInfoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DFCB3282966684500332B35 /* MTRCertificateInfoTests.m */; }; 3DFCB32C29678C9500332B35 /* MTRConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DFCB32B29678C9500332B35 /* MTRConversion.h */; }; 51029DF6293AA6100087AFB0 /* MTROperationalCertificateIssuer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51029DF5293AA6100087AFB0 /* MTROperationalCertificateIssuer.mm */; }; + 510470FB2A2F7DF60053EA7E /* MTRBackwardsCompatShims.mm in Sources */ = {isa = PBXBuildFile; fileRef = 510470FA2A2F7DF60053EA7E /* MTRBackwardsCompatShims.mm */; }; 510CECA8297F72970064E0B3 /* MTROperationalCertificateIssuerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 510CECA6297F72470064E0B3 /* MTROperationalCertificateIssuerTests.m */; }; 5117DD3829A931AE00FFA1AA /* MTROperationalBrowser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5117DD3629A931AD00FFA1AA /* MTROperationalBrowser.mm */; }; 5117DD3929A931AE00FFA1AA /* MTROperationalBrowser.h in Headers */ = {isa = PBXBuildFile; fileRef = 5117DD3729A931AE00FFA1AA /* MTROperationalBrowser.h */; }; @@ -170,6 +171,7 @@ 51E51FBF282AD37A00FC978D /* MTRDeviceControllerStartupParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51E51FC0282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */; }; 51E51FC1282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */; }; + 51EF279F2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h in Headers */ = {isa = PBXBuildFile; fileRef = 51EF279E2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5A60370827EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A60370727EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h */; }; 5A6FEC9027B563D900F25F42 /* MTRDeviceControllerOverXPC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5A6FEC8F27B563D900F25F42 /* MTRDeviceControllerOverXPC.mm */; }; 5A6FEC9227B5669C00F25F42 /* MTRDeviceControllerOverXPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A6FEC8D27B5624E00F25F42 /* MTRDeviceControllerOverXPC.h */; }; @@ -416,6 +418,7 @@ 3DFCB32A2966827F00332B35 /* MTRDefines_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDefines_Internal.h; sourceTree = ""; }; 3DFCB32B29678C9500332B35 /* MTRConversion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRConversion.h; sourceTree = ""; }; 51029DF5293AA6100087AFB0 /* MTROperationalCertificateIssuer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROperationalCertificateIssuer.mm; sourceTree = ""; }; + 510470FA2A2F7DF60053EA7E /* MTRBackwardsCompatShims.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRBackwardsCompatShims.mm; sourceTree = ""; }; 510CECA6297F72470064E0B3 /* MTROperationalCertificateIssuerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTROperationalCertificateIssuerTests.m; sourceTree = ""; }; 5117DD3629A931AD00FFA1AA /* MTROperationalBrowser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROperationalBrowser.mm; sourceTree = ""; }; 5117DD3729A931AE00FFA1AA /* MTROperationalBrowser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTROperationalBrowser.h; sourceTree = ""; }; @@ -461,6 +464,7 @@ 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStartupParams.h; sourceTree = ""; }; 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStartupParams_Internal.h; sourceTree = ""; }; 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerStartupParams.mm; sourceTree = ""; }; + 51EF279E2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRBackwardsCompatShims.h; sourceTree = ""; }; 5A60370727EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MTRClusterStateCacheContainer+XPC.h"; sourceTree = ""; }; 5A6FEC8B27B5609C00F25F42 /* MTRDeviceOverXPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceOverXPC.h; sourceTree = ""; }; 5A6FEC8D27B5624E00F25F42 /* MTRDeviceControllerOverXPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerOverXPC.h; sourceTree = ""; }; @@ -937,6 +941,8 @@ 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */, 513DDB852761F69300DAA01A /* MTRAttributeTLVValueDecoder_Internal.h */, 75B765C02A1D71BC0014719B /* MTRAttributeSpecifiedCheck.h */, + 51EF279E2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h */, + 510470FA2A2F7DF60053EA7E /* MTRBackwardsCompatShims.mm */, 51E4D120291D0EB400C8C535 /* MTRBaseClusterUtils.h */, 2C222ADE255C811800E446B9 /* MTRBaseDevice_Internal.h */, 2C222ACE255C620600E446B9 /* MTRBaseDevice.h */, @@ -1137,6 +1143,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 51EF279F2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h in Headers */, 5173A47729C0E2ED00F67F48 /* MTRFabricInfo.h in Headers */, 517BF3F0282B62B800A8B7DB /* MTRCertificates.h in Headers */, 51E51FBF282AD37A00FC978D /* MTRDeviceControllerStartupParams.h in Headers */, @@ -1436,6 +1443,7 @@ 517BF3F1282B62B800A8B7DB /* MTRCertificates.mm in Sources */, 5A6FEC9627B5983000F25F42 /* MTRDeviceControllerXPCConnection.mm in Sources */, 511913FB28C100EF009235E9 /* MTRBaseSubscriptionCallback.mm in Sources */, + 510470FB2A2F7DF60053EA7E /* MTRBackwardsCompatShims.mm in Sources */, 5173A47629C0E2ED00F67F48 /* MTRFabricInfo.mm in Sources */, 5ACDDD7D27CD16D200EFD68A /* MTRClusterStateCacheContainer.mm in Sources */, 513DDB8A2761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm in Sources */, diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.h b/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.h index 88d98ec9613d92..70b382f961427e 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.h +++ b/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.h @@ -26,7 +26,14 @@ #include #include +#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS #include +#endif + +#if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS +#include +#endif + #include namespace chip { diff --git a/src/inet/IPAddress-StringFuncts.cpp b/src/inet/IPAddress-StringFuncts.cpp index 1f15e05844b0fe..12beec23ec2295 100644 --- a/src/inet/IPAddress-StringFuncts.cpp +++ b/src/inet/IPAddress-StringFuncts.cpp @@ -34,7 +34,7 @@ #include #include -#if CHIP_SYSTEM_CONFIG_USE_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK +#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK #include #endif diff --git a/src/inet/IPAddress.h b/src/inet/IPAddress.h index 661d0f84d65a91..c97f25de752d44 100644 --- a/src/inet/IPAddress.h +++ b/src/inet/IPAddress.h @@ -56,14 +56,18 @@ #include #endif // CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT -#if CHIP_SYSTEM_CONFIG_USE_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK +#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK #include #include -#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK +#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK -#if CHIP_SYSTEM_CONFIG_USE_SOCKETS +#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS #include -#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS +#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS + +#if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS +#include +#endif // CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS #if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT && INET_CONFIG_ENABLE_IPV4 #error Forbidden : native Open Thread implementation with IPV4 enabled diff --git a/src/inet/UDPEndPointImplSockets.cpp b/src/inet/UDPEndPointImplSockets.cpp index 6c85906bb7a9ed..5c9748d0cf32fb 100644 --- a/src/inet/UDPEndPointImplSockets.cpp +++ b/src/inet/UDPEndPointImplSockets.cpp @@ -30,14 +30,20 @@ #include #include +#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS #if HAVE_SYS_SOCKET_H #include #endif // HAVE_SYS_SOCKET_H - -#include #include #include #include +#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS + +#if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS +#include +#endif // CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS + +#include #include #include diff --git a/src/inet/ZephyrSocket.h b/src/inet/ZephyrSocket.h index 56cc9dcde15a98..93e4c055d8059e 100644 --- a/src/inet/ZephyrSocket.h +++ b/src/inet/ZephyrSocket.h @@ -23,7 +23,13 @@ #pragma once -#include +#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS +#include +#endif + +#if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS +#include +#endif static inline ssize_t recvmsg(int sock, struct msghdr * msg, int flags) { diff --git a/src/inet/arpa-inet-compatibility.h b/src/inet/arpa-inet-compatibility.h index 56d9121e40d5ae..ce4f2f923c7e73 100644 --- a/src/inet/arpa-inet-compatibility.h +++ b/src/inet/arpa-inet-compatibility.h @@ -20,7 +20,7 @@ #include -#if CHIP_SYSTEM_CONFIG_USE_SOCKETS +#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS #include #else // !CHIP_SYSTEM_CONFIG_USE_SOCKETS diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 0a3b60f18b9c88..24a88cb64df273 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -1355,16 +1355,6 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; #define CHIP_CONFIG_NUM_CD_KEY_SLOTS 5 #endif // CHIP_CONFIG_NUM_CD_KEY_SLOTS -/** - * @def CHIP_CONFIG_MAX_CLIENT_REG_PER_FABRIC - * - * @brief Defines the number of clients that can register for monitoring with a server - * see ClientMonitoring cluster for specification - */ -#ifndef CHIP_CONFIG_MAX_CLIENT_REG_PER_FABRIC -#define CHIP_CONFIG_MAX_CLIENT_REG_PER_FABRIC 1 -#endif // CHIP_CONFIG_MAX_CLIENT_REG_PER_FABRIC - /** * @def CHIP_CONFIG_MAX_SUBSCRIPTION_RESUMPTION_STORAGE_CONCURRENT_ITERATORS * diff --git a/src/lib/shell/MainLoopZephyr.cpp b/src/lib/shell/MainLoopZephyr.cpp index 53080066704e3e..d106bfa89fa13b 100644 --- a/src/lib/shell/MainLoopZephyr.cpp +++ b/src/lib/shell/MainLoopZephyr.cpp @@ -28,11 +28,8 @@ static int cmd_matter(const struct shell * shell, size_t argc, char ** argv) chip::Shell::streamer_set_shell(shell); return (Engine::Root().ExecCommand(argc - 1, argv + 1) == CHIP_NO_ERROR) ? 0 : -ENOEXEC; } -#ifdef CONFIG_BOARD_TLSR9518ADK80D -static int RegisterCommands(void) -#else -static int RegisterCommands(const struct device * dev) -#endif /* CONFIG_BOARD_TLSR9518ADK80D */ + +static int RegisterCommands() { Engine::Root().RegisterDefaultCommands(); return 0; diff --git a/src/lib/support/DefaultStorageKeyAllocator.h b/src/lib/support/DefaultStorageKeyAllocator.h index 51e006cfa41b8e..b437062d049b66 100644 --- a/src/lib/support/DefaultStorageKeyAllocator.h +++ b/src/lib/support/DefaultStorageKeyAllocator.h @@ -175,11 +175,11 @@ class DefaultStorageKeyAllocator static StorageKeyName BindingTable() { return StorageKeyName::FromConst("g/bt"); } static StorageKeyName BindingTableEntry(uint8_t index) { return StorageKeyName::Formatted("g/bt/%x", index); } - // Client Monitoring + // ICD Management - static StorageKeyName ClientMonitoringTableEntry(chip::FabricIndex fabric) + static StorageKeyName IcdManagementTableEntry(chip::FabricIndex fabric, uint16_t index) { - return StorageKeyName::Formatted("f/%x/cm", fabric); + return StorageKeyName::Formatted("f/%x/icd/%x", fabric, index); } static StorageKeyName OTADefaultProviders() { return StorageKeyName::FromConst("g/o/dp"); } diff --git a/src/lib/support/PersistentData.h b/src/lib/support/PersistentData.h index 4ad74da92bf32a..20286d41e6642e 100644 --- a/src/lib/support/PersistentData.h +++ b/src/lib/support/PersistentData.h @@ -23,11 +23,12 @@ namespace chip { /// @brief Interface to Persistent Storage Delegate allowing storage of data of variable size such as TLV. -/// @tparam kMaxSerializedSize size of the buffer necessary to retrieve an entry from the storage. Varies with the type of data +/// @tparam kMaxSerializedSize size of the mBuffer necessary to retrieve an entry from the storage. Varies with the type of data /// stored. Will be allocated on the stack so the implementation needs to be aware of this when choosing this value. template struct PersistentData { + PersistentData(PersistentStorageDelegate * storage = nullptr) : mStorage(storage) {} virtual ~PersistentData() = default; virtual CHIP_ERROR UpdateKey(StorageKeyName & key) = 0; @@ -35,45 +36,48 @@ struct PersistentData virtual CHIP_ERROR Deserialize(TLV::TLVReader & reader) = 0; virtual void Clear() = 0; + virtual CHIP_ERROR Save() { return this->Save(this->mStorage); } + virtual CHIP_ERROR Save(PersistentStorageDelegate * storage) { VerifyOrReturnError(nullptr != storage, CHIP_ERROR_INVALID_ARGUMENT); - uint8_t buffer[kMaxSerializedSize] = { 0 }; - StorageKeyName key = StorageKeyName::Uninitialized(); + StorageKeyName key = StorageKeyName::Uninitialized(); ReturnErrorOnFailure(UpdateKey(key)); // Serialize the data TLV::TLVWriter writer; - writer.Init(buffer, sizeof(buffer)); + writer.Init(mBuffer, sizeof(mBuffer)); + ReturnErrorOnFailure(Serialize(writer)); // Save serialized data - return storage->SyncSetKeyValue(key.KeyName(), buffer, static_cast(writer.GetLengthWritten())); + return storage->SyncSetKeyValue(key.KeyName(), mBuffer, static_cast(writer.GetLengthWritten())); } + virtual CHIP_ERROR Load() { return this->Load(this->mStorage); } + virtual CHIP_ERROR Load(PersistentStorageDelegate * storage) { VerifyOrReturnError(nullptr != storage, CHIP_ERROR_INVALID_ARGUMENT); - uint8_t buffer[kMaxSerializedSize] = { 0 }; - StorageKeyName key = StorageKeyName::Uninitialized(); - - // Set data to defaults - Clear(); + StorageKeyName key = StorageKeyName::Uninitialized(); // Update storage key ReturnErrorOnFailure(UpdateKey(key)); + // Set data to defaults + Clear(); + // Load the serialized data - uint16_t size = static_cast(sizeof(buffer)); - CHIP_ERROR err = storage->SyncGetKeyValue(key.KeyName(), buffer, size); + uint16_t size = static_cast(sizeof(mBuffer)); + CHIP_ERROR err = storage->SyncGetKeyValue(key.KeyName(), mBuffer, size); VerifyOrReturnError(CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND != err, CHIP_ERROR_NOT_FOUND); ReturnErrorOnFailure(err); // Decode serialized data TLV::TLVReader reader; - reader.Init(buffer, size); + reader.Init(mBuffer, size); return Deserialize(reader); } @@ -86,6 +90,9 @@ struct PersistentData return storage->SyncDeleteKeyValue(key.KeyName()); } + + PersistentStorageDelegate * mStorage = nullptr; + uint8_t mBuffer[kMaxSerializedSize] = { 0 }; }; } // namespace chip diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm index 70b6605eb2fd5c..6d56573959b6b9 100644 --- a/src/platform/Darwin/BleConnectionDelegateImpl.mm +++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm @@ -589,7 +589,8 @@ - (void)startScanning return; } - [_centralManager scanForPeripheralsWithServices:@[ _shortServiceUUID ] options:nil]; + auto scanOptions = @{ CBCentralManagerScanOptionAllowDuplicatesKey : @YES }; + [_centralManager scanForPeripheralsWithServices:@[ _shortServiceUUID ] options:scanOptions]; } - (void)stopScanning @@ -716,7 +717,7 @@ - (void)addPeripheralToCache:(CBPeripheral *)peripheral data:(NSData *)data ChipLogProgress(Ble, " - Version: %u", info.GetAdvertisementVersion()); ChipLogProgress(Ble, " - Discriminator: %u", info.GetDeviceDiscriminator()); ChipLogProgress(Ble, " - VendorId: %u", info.GetVendorId()); - ChipLogProgress(Ble, " - ProductId: %u", info.GetVendorId()); + ChipLogProgress(Ble, " - ProductId: %u", info.GetProductId()); } } diff --git a/src/platform/ESP32/CHIPPlatformConfig.h b/src/platform/ESP32/CHIPPlatformConfig.h index 9f7faedb8a0ff7..a01ead49544a20 100644 --- a/src/platform/ESP32/CHIPPlatformConfig.h +++ b/src/platform/ESP32/CHIPPlatformConfig.h @@ -41,7 +41,11 @@ // The ESP NVS implementation limits key names to 15 characters. #define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 15 +#ifndef CONFIG_CHIP_LOG_FILTERING #define CHIP_LOG_FILTERING 0 +#else +#define CHIP_LOG_FILTERING CONFIG_CHIP_LOG_FILTERING +#endif #define CHIP_CONFIG_ABORT() abort() diff --git a/src/platform/ESP32/ESP32Config.h b/src/platform/ESP32/ESP32Config.h index e07d98eba27594..fbcef1126be177 100644 --- a/src/platform/ESP32/ESP32Config.h +++ b/src/platform/ESP32/ESP32Config.h @@ -198,17 +198,17 @@ class ESP32Config::KeyAllocator VerifyOrReturnError(key, CHIP_ERROR_INVALID_ARGUMENT); return snprintf(key, size, "sm-mode/%x/%x", endpoint, index) > 0 ? CHIP_NO_ERROR : CHIP_ERROR_INTERNAL; } - static CHIP_ERROR SemanticTagsCount(char * key, size_t size, uint16_t endpoint, uint16_t index) + static CHIP_ERROR ModeTagsCount(char * key, size_t size, uint16_t endpoint, uint16_t index) { VerifyOrReturnError(key, CHIP_ERROR_INVALID_ARGUMENT); return snprintf(key, size, "sm-st-sz/%x/%x", endpoint, index) > 0 ? CHIP_NO_ERROR : CHIP_ERROR_INTERNAL; } - static CHIP_ERROR SemanticTagValue(char * key, size_t size, uint16_t endpoint, uint16_t index, uint16_t ind) + static CHIP_ERROR ModeTagValue(char * key, size_t size, uint16_t endpoint, uint16_t index, uint16_t ind) { VerifyOrReturnError(key, CHIP_ERROR_INVALID_ARGUMENT); return snprintf(key, size, "st-v/%x/%x/%x", endpoint, index, ind) > 0 ? CHIP_NO_ERROR : CHIP_ERROR_INTERNAL; } - static CHIP_ERROR SemanticTagMfgCode(char * key, size_t size, uint16_t endpoint, uint16_t index, uint16_t ind) + static CHIP_ERROR ModeTagMfgCode(char * key, size_t size, uint16_t endpoint, uint16_t index, uint16_t ind) { VerifyOrReturnError(key, CHIP_ERROR_INVALID_ARGUMENT); return snprintf(key, size, "st-mfg/%x/%x/%x", endpoint, index, ind) > 0 ? CHIP_NO_ERROR : CHIP_ERROR_INTERNAL; diff --git a/src/platform/ESP32/OTAImageProcessorImpl.cpp b/src/platform/ESP32/OTAImageProcessorImpl.cpp index a1bd313e75f378..0cff98147aa7a6 100644 --- a/src/platform/ESP32/OTAImageProcessorImpl.cpp +++ b/src/platform/ESP32/OTAImageProcessorImpl.cpp @@ -27,6 +27,10 @@ #include "esp_system.h" #include "lib/core/CHIPError.h" +#if CONFIG_ENABLE_ENCRYPTED_OTA +#include +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + #define TAG "OTAImageProcessor" using namespace chip::System; using namespace ::chip::DeviceLayer::Internal; @@ -54,6 +58,20 @@ void PostOTAStateChangeEvent(DeviceLayer::OtaState newState) } // namespace +#if CONFIG_ENABLE_ENCRYPTED_OTA +void OTAImageProcessorImpl::EndDecryption() +{ + VerifyOrReturn(mEncryptedOTAEnabled); + + esp_err_t err = esp_encrypted_img_decrypt_end(mOTADecryptionHandle); + if (err != ESP_OK) + { + ChipLogError(SoftwareUpdate, "Failed to end pre encrypted OTA esp_err:%d", err); + } + mOTADecryptionHandle = nullptr; +} +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + bool OTAImageProcessorImpl::IsFirstImageRun() { OTARequestorInterface * requestor = GetRequestorInstance(); @@ -145,6 +163,32 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) imageProcessor->mDownloader->OnPreparedForDownload(ESP32Utils::MapError(err)); return; } + +#if CONFIG_ENABLE_ENCRYPTED_OTA + if (imageProcessor->mEncryptedOTAEnabled == false) + { + ChipLogError(SoftwareUpdate, "Encrypted OTA is not initialized"); + imageProcessor->mDownloader->OnPreparedForDownload(ESP32Utils::MapError(err)); + return; + } + + // This struct takes in private key but arguments are named as pub_key + // This is the issue in the esp_encrypted_img component + // https://github.com/espressif/idf-extra-components/blob/791d506/esp_encrypted_img/include/esp_encrypted_img.h#L47 + const esp_decrypt_cfg_t decryptionConfig = { + .rsa_pub_key = imageProcessor->mKey.data(), + .rsa_pub_key_len = imageProcessor->mKey.size(), + }; + + imageProcessor->mOTADecryptionHandle = esp_encrypted_img_decrypt_start(&decryptionConfig); + if (imageProcessor->mOTADecryptionHandle == nullptr) + { + ChipLogError(SoftwareUpdate, "Failed to initialize encrypted OTA"); + imageProcessor->mDownloader->OnPreparedForDownload(ESP32Utils::MapError(ESP_FAIL)); + return; + } +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + imageProcessor->mHeaderParser.Init(); imageProcessor->mDownloader->OnPreparedForDownload(CHIP_NO_ERROR); PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadInProgress); @@ -158,6 +202,11 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context) ChipLogError(SoftwareUpdate, "ImageProcessor context is null"); return; } + +#if CONFIG_ENABLE_ENCRYPTED_OTA + imageProcessor->EndDecryption(); +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + esp_err_t err = esp_ota_end(imageProcessor->mOTAUpdateHandle); if (err != ESP_OK) { @@ -185,6 +234,11 @@ void OTAImageProcessorImpl::HandleAbort(intptr_t context) ChipLogError(SoftwareUpdate, "ImageProcessor context is null"); return; } + +#if CONFIG_ENABLE_ENCRYPTED_OTA + imageProcessor->EndDecryption(); +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + if (esp_ota_abort(imageProcessor->mOTAUpdateHandle) != ESP_OK) { ESP_LOGE(TAG, "ESP OTA abort failed"); @@ -218,7 +272,59 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context) return; } - esp_err_t err = esp_ota_write(imageProcessor->mOTAUpdateHandle, block.data(), block.size()); + esp_err_t err; + ByteSpan blockToWrite = block; + +#if CONFIG_ENABLE_ENCRYPTED_OTA + if (imageProcessor->mEncryptedOTAEnabled == false) + { + ChipLogError(SoftwareUpdate, "Encrypted OTA is not initialized"); + imageProcessor->mDownloader->EndDownload(CHIP_ERROR_INCORRECT_STATE); + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); + return; + } + + if (imageProcessor->mOTADecryptionHandle == nullptr) + { + ChipLogError(SoftwareUpdate, "OTA decryption handle is nullptr"); + imageProcessor->mDownloader->EndDownload(CHIP_ERROR_INCORRECT_STATE); + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); + return; + } + + pre_enc_decrypt_arg_t preEncOtaDecryptArgs = { + .data_in = reinterpret_cast(block.data()), + .data_in_len = block.size(), + .data_out = nullptr, + .data_out_len = 0, + }; + + err = esp_encrypted_img_decrypt_data(imageProcessor->mOTADecryptionHandle, &preEncOtaDecryptArgs); + if (err != ESP_OK && err != ESP_ERR_NOT_FINISHED) + { + ChipLogError(SoftwareUpdate, "esp_encrypted_img_decrypt_data failed err:%d", err); + imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED); + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); + return; + } + + ChipLogDetail(SoftwareUpdate, "data_in_len:%u, data_out_len:%u", preEncOtaDecryptArgs.data_in_len, + preEncOtaDecryptArgs.data_out_len); + + if (preEncOtaDecryptArgs.data_out == nullptr || preEncOtaDecryptArgs.data_out_len <= 0) + { + ChipLogProgress(SoftwareUpdate, "Decrypted data is null or out len is zero"); + } + + blockToWrite = ByteSpan(reinterpret_cast(preEncOtaDecryptArgs.data_out), preEncOtaDecryptArgs.data_out_len); +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + + err = esp_ota_write(imageProcessor->mOTAUpdateHandle, blockToWrite.data(), blockToWrite.size()); + +#if CONFIG_ENABLE_ENCRYPTED_OTA + free(preEncOtaDecryptArgs.data_out); +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + if (err != ESP_OK) { ESP_LOGE(TAG, "esp_ota_write failed (%s)", esp_err_to_name(err)); @@ -226,7 +332,8 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context) PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); return; } - imageProcessor->mParams.downloadedBytes += block.size(); + + imageProcessor->mParams.downloadedBytes += blockToWrite.size(); imageProcessor->mDownloader->FetchNextData(); } @@ -310,4 +417,16 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) return CHIP_NO_ERROR; } +#if CONFIG_ENABLE_ENCRYPTED_OTA +CHIP_ERROR OTAImageProcessorImpl::InitEncryptedOTA(const CharSpan & key) +{ + VerifyOrReturnError(mEncryptedOTAEnabled == false, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(IsSpanUsable(key), CHIP_ERROR_INVALID_ARGUMENT); + + mKey = key; + mEncryptedOTAEnabled = true; + return CHIP_NO_ERROR; +} +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + } // namespace chip diff --git a/src/platform/ESP32/OTAImageProcessorImpl.h b/src/platform/ESP32/OTAImageProcessorImpl.h index 5d0775c4392f13..03e1367767d97a 100644 --- a/src/platform/ESP32/OTAImageProcessorImpl.h +++ b/src/platform/ESP32/OTAImageProcessorImpl.h @@ -23,6 +23,10 @@ #include #include +#if CONFIG_ENABLE_ENCRYPTED_OTA +#include +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + namespace chip { class OTAImageProcessorImpl : public OTAImageProcessorInterface @@ -38,6 +42,13 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface bool IsFirstImageRun() override; CHIP_ERROR ConfirmCurrentImage() override; +#if CONFIG_ENABLE_ENCRYPTED_OTA + // @brief This API initializes the handling of encrypted OTA image + // @param key null terminated RSA-3072 key in PEM format + // @return CHIP_NO_ERROR on success, appropriate error code otherwise + CHIP_ERROR InitEncryptedOTA(const CharSpan & key); +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + private: static void HandlePrepareDownload(intptr_t context); static void HandleFinalize(intptr_t context); @@ -54,6 +65,14 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface const esp_partition_t * mOTAUpdatePartition = nullptr; esp_ota_handle_t mOTAUpdateHandle; OTAImageHeaderParser mHeaderParser; + +#if CONFIG_ENABLE_ENCRYPTED_OTA + void EndDecryption(); + + CharSpan mKey; + bool mEncryptedOTAEnabled = false; + esp_decrypt_handle_t mOTADecryptionHandle = nullptr; +#endif // CONFIG_ENABLE_ENCRYPTED_OTA }; } // namespace chip diff --git a/src/platform/Zephyr/BLEAdvertisingArbiter.cpp b/src/platform/Zephyr/BLEAdvertisingArbiter.cpp index 24f7b27317b637..29f55168f1c627 100644 --- a/src/platform/Zephyr/BLEAdvertisingArbiter.cpp +++ b/src/platform/Zephyr/BLEAdvertisingArbiter.cpp @@ -38,6 +38,8 @@ const BLEAdvertisingArbiter::Request & ToRequest(const sys_snode_t * node) // Notify application about stopped advertising if the callback has been provided void NotifyAdvertisingStopped(const sys_snode_t * node) { + VerifyOrReturn(node); + const Request & request = ToRequest(node); if (request.onStopped != nullptr) diff --git a/src/platform/Zephyr/SysHeapMalloc.cpp b/src/platform/Zephyr/SysHeapMalloc.cpp index 1a80fadd1835a7..d4f65b05459615 100644 --- a/src/platform/Zephyr/SysHeapMalloc.cpp +++ b/src/platform/Zephyr/SysHeapMalloc.cpp @@ -67,7 +67,7 @@ LockGuard::~LockGuard() } } -int initHeap(const device *) +int initHeap() { sys_heap_init(&sHeap, sHeapMemory, sizeof(sHeapMemory)); return 0; diff --git a/src/platform/nrfconnect/BUILD.gn b/src/platform/nrfconnect/BUILD.gn index 7b1a8872aa2d39..65167ac4c8b5f5 100644 --- a/src/platform/nrfconnect/BUILD.gn +++ b/src/platform/nrfconnect/BUILD.gn @@ -97,6 +97,7 @@ static_library("nrfconnect") { sources += [ "../Zephyr/InetUtils.cpp", "../Zephyr/InetUtils.h", + "OTAImageProcessorImplWiFi.h", "wifi/ConnectivityManagerImplWiFi.cpp", "wifi/ConnectivityManagerImplWiFi.h", "wifi/NrfWiFiDriver.cpp", diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index f92203a93e1641..5e08040f7b2381 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -249,3 +249,15 @@ #ifdef CONFIG_CHIP_EXTENDED_DISCOVERY #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 #endif // CONFIG_CHIP_EXTENDED_DISCOVERY + +#ifndef CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH +#if CONFIG_CHIP_FACTORY_DATA +// UID will be copied from the externally programmed factory data, so we don't know the actual length and we need to assume some max +// boundary. +#define CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH CONFIG_CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN +#else +// UID will be copied from hex encoded Kconfig option, so we may calculate its length in bytes by subtracting null terminator and +// dividing size by 2. +#define CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH ((sizeof(CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID) - 1) / 2) +#endif // CONFIG_CHIP_FACTORY_DATA +#endif // CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH diff --git a/src/platform/nrfconnect/FactoryDataProvider.cpp b/src/platform/nrfconnect/FactoryDataProvider.cpp index 86fb8a354b9a5a..45adec502140e5 100644 --- a/src/platform/nrfconnect/FactoryDataProvider.cpp +++ b/src/platform/nrfconnect/FactoryDataProvider.cpp @@ -323,6 +323,8 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(Mu memcpy(uniqueIdSpan.data(), mFactoryData.rd_uid.data, mFactoryData.rd_uid.len); + uniqueIdSpan.reduce_size(mFactoryData.rd_uid.len); + return CHIP_NO_ERROR; } diff --git a/src/platform/nrfconnect/FactoryDataProvider.h b/src/platform/nrfconnect/FactoryDataProvider.h index 368ec957eff5bd..15dae3ab7e3a0e 100644 --- a/src/platform/nrfconnect/FactoryDataProvider.h +++ b/src/platform/nrfconnect/FactoryDataProvider.h @@ -40,11 +40,43 @@ struct InternalFlashFactoryData return CHIP_NO_ERROR; } +#ifdef CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT +#define TO_STR_IMPL(x) #x +#define TO_STR(x) TO_STR_IMPL(x) + // These two helpers allows to get the factory data memory block which shall be protected with fprotect, so that: + // 1) it is aligned to the multiple of CONFIG_FPROTECT_BLOCK_SIZE (which differs between nRF families) + // 2) it does not exceed the settings partition start address + // Note that this block can overlap with app partition but this is not a problem since we do not aim to modify + // the application code at runtime anyway. + constexpr size_t FactoryDataBlockBegin() + { + // calculate the nearest multiple of CONFIG_FPROTECT_BLOCK_SIZE smaller than PM_FACTORY_DATA_ADDRESS + return PM_FACTORY_DATA_ADDRESS & (-CONFIG_FPROTECT_BLOCK_SIZE); + } + + constexpr size_t FactoryDataBlockSize() + { + // calculate the factory data end address rounded up to the nearest multiple of CONFIG_FPROTECT_BLOCK_SIZE + // and make sure we do not overlap with settings partition + constexpr size_t kFactoryDataBlockEnd = + (PM_FACTORY_DATA_ADDRESS + PM_FACTORY_DATA_SIZE + CONFIG_FPROTECT_BLOCK_SIZE - 1) & (-CONFIG_FPROTECT_BLOCK_SIZE); + static_assert(kFactoryDataBlockEnd <= PM_SETTINGS_STORAGE_ADDRESS, + "FPROTECT memory block, which contains factory data" + "partition overlaps with the settings partition." + "Probably your settings partition size is not a multiple" + "of the atomic FPROTECT block size of " TO_STR(CONFIG_FPROTECT_BLOCK_SIZE) "kB"); + return kFactoryDataBlockEnd - FactoryDataBlockBegin(); + } +#undef TO_STR +#undef TO_STR_IMPL CHIP_ERROR ProtectFactoryDataPartitionAgainstWrite() { - int ret = fprotect_area(PM_FACTORY_DATA_ADDRESS, PM_FACTORY_DATA_SIZE); + int ret = fprotect_area(FactoryDataBlockBegin(), FactoryDataBlockSize()); return System::MapErrorZephyr(ret); } +#else + CHIP_ERROR ProtectFactoryDataPartitionAgainstWrite() { return CHIP_ERROR_NOT_IMPLEMENTED; } +#endif }; struct ExternalFlashFactoryData diff --git a/src/platform/nrfconnect/OTAImageProcessorImplWiFi.h b/src/platform/nrfconnect/OTAImageProcessorImplWiFi.h new file mode 100644 index 00000000000000..f7465312c9f003 --- /dev/null +++ b/src/platform/nrfconnect/OTAImageProcessorImplWiFi.h @@ -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. + */ + +#pragma once + +#include "OTAImageProcessorImpl.h" +#include "wifi/WiFiManager.h" + +namespace chip { + +namespace DeviceLayer { + +class OTAImageProcessorImplWiFi : public OTAImageProcessorImpl +{ +public: + explicit OTAImageProcessorImplWiFi(ExternalFlashManager * flashHandler = nullptr) : OTAImageProcessorImpl(flashHandler) {} + + CHIP_ERROR PrepareDownload() override + { + CHIP_ERROR err = WiFiManager::Instance().SetLowPowerMode(false); + if (err == CHIP_NO_ERROR) + { + return OTAImageProcessorImpl::PrepareDownload(); + } + return err; + }; + + CHIP_ERROR Abort() override + { + CHIP_ERROR err = OTAImageProcessorImpl::Abort(); + if (err == CHIP_NO_ERROR) + { + return WiFiManager::Instance().SetLowPowerMode(true); + } + return err; + }; + + CHIP_ERROR Apply() override + { + CHIP_ERROR err = OTAImageProcessorImpl::Apply(); + if (err == CHIP_NO_ERROR) + { + return WiFiManager::Instance().SetLowPowerMode(true); + } + return err; + }; +}; + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nrfconnect/wifi/WiFiManager.cpp b/src/platform/nrfconnect/wifi/WiFiManager.cpp index d8e60bada951ec..68192516b73437 100644 --- a/src/platform/nrfconnect/wifi/WiFiManager.cpp +++ b/src/platform/nrfconnect/wifi/WiFiManager.cpp @@ -138,11 +138,12 @@ const Map { WIFI_STATE_GROUP_HANDSHAKE, WiFiManager::StationStatus::PROVISIONING }, { WIFI_STATE_COMPLETED, WiFiManager::StationStatus::FULLY_PROVISIONED } }); -const Map +const Map WiFiManager::sEventHandlerMap({ { NET_EVENT_WIFI_SCAN_RESULT, WiFiManager::ScanResultHandler }, { NET_EVENT_WIFI_SCAN_DONE, WiFiManager::ScanDoneHandler }, { NET_EVENT_WIFI_CONNECT_RESULT, WiFiManager::ConnectHandler }, - { NET_EVENT_WIFI_DISCONNECT_RESULT, WiFiManager::DisconnectHandler } }); + { NET_EVENT_WIFI_DISCONNECT_RESULT, WiFiManager::NetworkDrivenDisconnectHandler }, + { NET_EVENT_WIFI_DISCONNECT_COMPLETE, WiFiManager::ApplicationDrivenDisconnectHandler } }); void WiFiManager::WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface) { @@ -205,10 +206,32 @@ CHIP_ERROR WiFiManager::Scan(const ByteSpan & ssid, ScanResultCallback resultCal mCachedWiFiState = mWiFiState; mWiFiState = WIFI_STATE_SCANNING; mSsidFound = false; + mRecoveryArmed = true; + // TODO Workaround for recovery mechanism to wait before the next scan request until the WiFi supplicant is not busy. + static bool workaroundDone; - if (net_mgmt(NET_REQUEST_WIFI_SCAN, iface, NULL, 0)) + int ret = net_mgmt(NET_REQUEST_WIFI_SCAN, iface, NULL, 0); + + if (ret) { - ChipLogError(DeviceLayer, "Scan request failed"); + ChipLogError(DeviceLayer, "Scan request failed %d", ret); + if (ret == -EBUSY && !workaroundDone) + { + // TODO Wi-Fi driver returned an error during recovery. + // As a workaround schedule the recovery timer one more time in WifiSupplicantWorkaroundTime time. + // This allows the device to run the Scan method without + // rebooting when the "Device or resource busy" error occurs. + DeviceLayer::SystemLayer().StartTimer(System::Clock::Milliseconds32(kWifiSupplicantWorkaroundTime), Recover, nullptr); + workaroundDone = true; + return CHIP_NO_ERROR; + } + else + { + // TODO The workaround has not worked, so reboot the device + ChipLogError(DeviceLayer, "WiFi driver does not respond, resetting the device..."); + workaroundDone = false; + PlatformMgr().Shutdown(); + } return CHIP_ERROR_INTERNAL; } @@ -250,10 +273,12 @@ CHIP_ERROR WiFiManager::Disconnect() net_if * iface = InetUtils::GetInterface(); VerifyOrReturnError(nullptr != iface, CHIP_ERROR_INTERNAL); - int status = net_mgmt(NET_REQUEST_WIFI_DISCONNECT, iface, NULL, 0); + mApplicationDisconnectRequested = true; + int status = net_mgmt(NET_REQUEST_WIFI_DISCONNECT, iface, NULL, 0); if (status) { + mApplicationDisconnectRequested = false; if (status == -EALREADY) { ChipLogDetail(DeviceLayer, "Already disconnected"); @@ -387,15 +412,21 @@ void WiFiManager::ScanDoneHandler(Platform::UniquePtr data) // Internal scan is supposed to be followed by a connection request if the SSID has been found if (Instance().mInternalScan) { - if (!Instance().mSsidFound && !Instance().mRecoveryTimerAborted) + if (Instance().mRecoveryArmed) { - ChipLogProgress(DeviceLayer, "No requested SSID found"); - auto currentTimeout = Instance().CalculateNextRecoveryTime(); - ChipLogProgress(DeviceLayer, "Starting connection recover: re-scanning... (next attempt in %d ms)", - currentTimeout.count()); - Instance().mRecoveryTimerAborted = false; - DeviceLayer::SystemLayer().StartTimer(currentTimeout, Recover, nullptr); - return; + if (!Instance().mSsidFound) + { + ChipLogProgress(DeviceLayer, "No requested SSID found"); + auto currentTimeout = Instance().CalculateNextRecoveryTime(); + ChipLogProgress(DeviceLayer, "Starting connection recover: re-scanning... (next attempt in %d ms)", + currentTimeout.count()); + DeviceLayer::SystemLayer().StartTimer(currentTimeout, Recover, nullptr); + return; + } + else + { + Instance().AbortConnectionRecovery(); + } } Instance().mWiFiState = WIFI_STATE_ASSOCIATING; @@ -412,8 +443,8 @@ void WiFiManager::ScanDoneHandler(Platform::UniquePtr data) Instance().mWiFiState = WIFI_STATE_DISCONNECTED; return; } - ChipLogProgress(DeviceLayer, "Connection to %*s requested", Instance().mWiFiParams.mParams.ssid_length, - Instance().mWiFiParams.mParams.ssid); + ChipLogProgress(DeviceLayer, "Connection to %*s requested [RSSI=%d]", Instance().mWiFiParams.mParams.ssid_length, + Instance().mWiFiParams.mParams.ssid, Instance().mWiFiParams.mRssi); Instance().mInternalScan = false; } }); @@ -499,17 +530,43 @@ void WiFiManager::ConnectHandler(Platform::UniquePtr data) } } -void WiFiManager::DisconnectHandler(Platform::UniquePtr) +void WiFiManager::NetworkDrivenDisconnectHandler(Platform::UniquePtr) { + // Workaround: schedule the application level connection recovery in kSupplicantReconnectionTimeoutMs to give WPA supplicant + // some time to restore it. + if (!Instance().mRecoveryArmed) + { + Instance().mRecoveryArmed = true; + DeviceLayer::SystemLayer().StartTimer( + System::Clock::Milliseconds32(kSupplicantReconnectionTimeoutMs), + [](System::Layer * layer, void * param) { Instance().Disconnect(); }, nullptr); + } + SystemLayer().ScheduleLambda([] { ChipLogProgress(DeviceLayer, "WiFi station disconnected"); Instance().mWiFiState = WIFI_STATE_DISCONNECTED; Instance().PostConnectivityStatusChange(kConnectivity_Lost); - // Ensure fresh recovery for future connection requests. - Instance().ResetRecoveryTime(); }); } +void WiFiManager::ApplicationDrivenDisconnectHandler(Platform::UniquePtr) +{ + if (!Instance().mRecoveryArmed) + { + return; + } + + if (!Instance().mApplicationDisconnectRequested) + { + Instance().AbortConnectionRecovery(); + } + else + { + Instance().mApplicationDisconnectRequested = false; + SystemLayer().ScheduleLambda([] { Recover(nullptr, nullptr); }); + } +} + WiFiManager::StationStatus WiFiManager::GetStationStatus() const { return WiFiManager::sStatusMap[mWiFiState]; @@ -542,6 +599,13 @@ System::Clock::Milliseconds32 WiFiManager::CalculateNextRecoveryTime() void WiFiManager::Recover(System::Layer *, void *) { + // Prevent scheduling recovery if we are already connected to the network. + if (Instance().mWiFiState == WIFI_STATE_COMPLETED) + { + Instance().AbortConnectionRecovery(); + return; + } + // If kConnectionRecoveryMaxOverallInterval has a non-zero value prevent endless re-scan. if (0 != kConnectionRecoveryMaxRetries && (++Instance().mConnectionRecoveryCounter >= kConnectionRecoveryMaxRetries)) { @@ -562,7 +626,36 @@ void WiFiManager::AbortConnectionRecovery() { DeviceLayer::SystemLayer().CancelTimer(Recover, nullptr); Instance().ResetRecoveryTime(); - Instance().mRecoveryTimerAborted = true; + Instance().mRecoveryArmed = false; +} + +CHIP_ERROR WiFiManager::SetLowPowerMode(bool onoff) +{ + net_if * iface = InetUtils::GetInterface(); + VerifyOrReturnError(nullptr != iface, CHIP_ERROR_INTERNAL); + + wifi_ps_config currentConfig{}; + if (net_mgmt(NET_REQUEST_WIFI_PS_CONFIG, iface, ¤tConfig, sizeof(currentConfig))) + { + ChipLogError(DeviceLayer, "Get current low power mode config request failed"); + return CHIP_ERROR_INTERNAL; + } + + if ((currentConfig.ps_params.enabled == WIFI_PS_ENABLED && onoff == false) || + (currentConfig.ps_params.enabled == WIFI_PS_DISABLED && onoff == true)) + { + wifi_ps_params params{ .enabled = onoff ? WIFI_PS_ENABLED : WIFI_PS_DISABLED }; + if (net_mgmt(NET_REQUEST_WIFI_PS, iface, ¶ms, sizeof(params))) + { + ChipLogError(DeviceLayer, "Set low power mode request failed"); + return CHIP_ERROR_INTERNAL; + } + ChipLogProgress(DeviceLayer, "Successfully set low power mode [%d]", onoff); + return CHIP_NO_ERROR; + } + + ChipLogDetail(DeviceLayer, "Low power mode is already in requested state [%d]", onoff); + return CHIP_NO_ERROR; } } // namespace DeviceLayer diff --git a/src/platform/nrfconnect/wifi/WiFiManager.h b/src/platform/nrfconnect/wifi/WiFiManager.h index 880ab4c4ba2a50..5c477d7fa6c73e 100644 --- a/src/platform/nrfconnect/wifi/WiFiManager.h +++ b/src/platform/nrfconnect/wifi/WiFiManager.h @@ -173,6 +173,7 @@ class WiFiManager static constexpr uint32_t kConnectionRecoveryMaxIntervalMs = CONFIG_CHIP_WIFI_CONNECTION_RECOVERY_MAXIMUM_INTERVAL; static constexpr uint32_t kConnectionRecoveryJitterMs = CONFIG_CHIP_WIFI_CONNECTION_RECOVERY_JITTER; static constexpr uint32_t kConnectionRecoveryMaxRetries = CONFIG_CHIP_WIFI_CONNECTION_RECOVERY_MAX_RETRIES_NUMBER; + static constexpr uint32_t kSupplicantReconnectionTimeoutMs = 60000; static_assert(kConnectionRecoveryMinIntervalMs < kConnectionRecoveryMaxIntervalMs); static_assert(kConnectionRecoveryJitterMs <= kConnectionRecoveryMaxIntervalMs); @@ -192,6 +193,7 @@ class WiFiManager CHIP_ERROR GetWiFiInfo(WiFiInfo & info) const; CHIP_ERROR GetNetworkStatistics(NetworkStatistics & stats) const; void AbortConnectionRecovery(); + CHIP_ERROR SetLowPowerMode(bool onoff); private: using NetEventHandler = void (*)(Platform::UniquePtr); @@ -203,14 +205,16 @@ class WiFiManager }; constexpr static uint32_t kWifiManagementEvents = NET_EVENT_WIFI_SCAN_RESULT | NET_EVENT_WIFI_SCAN_DONE | - NET_EVENT_WIFI_CONNECT_RESULT | NET_EVENT_WIFI_DISCONNECT_RESULT | NET_EVENT_WIFI_IFACE_STATUS; + NET_EVENT_WIFI_CONNECT_RESULT | NET_EVENT_WIFI_DISCONNECT_RESULT | NET_EVENT_WIFI_DISCONNECT_COMPLETE | + NET_EVENT_WIFI_IFACE_STATUS; // Event handling static void WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface); static void ScanResultHandler(Platform::UniquePtr data); static void ScanDoneHandler(Platform::UniquePtr data); static void ConnectHandler(Platform::UniquePtr data); - static void DisconnectHandler(Platform::UniquePtr data); + static void NetworkDrivenDisconnectHandler(Platform::UniquePtr data); + static void ApplicationDrivenDisconnectHandler(Platform::UniquePtr data); static void PostConnectivityStatusChange(ConnectivityChange changeType); static void SendRouterSolicitation(System::Layer * layer, void * param); @@ -240,10 +244,13 @@ class WiFiManager bool mSsidFound{ false }; uint32_t mConnectionRecoveryCounter{ 0 }; uint32_t mConnectionRecoveryTimeMs{ kConnectionRecoveryMinIntervalMs }; - bool mRecoveryTimerAborted{ false }; + bool mRecoveryArmed{ false }; + bool mApplicationDisconnectRequested{ false }; + // TODO Workaround for recovery mechanism to wait before the next scan request until the WiFi supplicant is not busy. + static constexpr uint32_t kWifiSupplicantWorkaroundTime = 8000; static const Map sStatusMap; - static const Map sEventHandlerMap; + static const Map sEventHandlerMap; }; } // namespace DeviceLayer diff --git a/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp b/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp index 5701c827b43bc7..831a7bc1f668df 100644 --- a/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp +++ b/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp @@ -25,6 +25,10 @@ #include "UserDirectedCommissioning.h" +#ifdef __ZEPHYR__ +#include +#endif // __ZEPHYR__ + #include namespace chip { @@ -50,7 +54,12 @@ CHIP_ERROR UserDirectedCommissioningClient::SendUDCMessage(TransportMgrBase * tr ChipLogError(AppServer, "UDC SendMessage failed: %" CHIP_ERROR_FORMAT, err.Format()); return err; } + // Zephyr doesn't provide usleep implementation. +#ifdef __ZEPHYR__ + k_usleep(100 * 1000); // 100ms +#else usleep(100 * 1000); // 100ms +#endif // __ZEPHYR__ } ChipLogProgress(Inet, "UDC msg sent"); diff --git a/src/python_testing/TC_CGEN_2_4.py b/src/python_testing/TC_CGEN_2_4.py index 6c8e36b907bb00..682e4b02f927d8 100644 --- a/src/python_testing/TC_CGEN_2_4.py +++ b/src/python_testing/TC_CGEN_2_4.py @@ -32,7 +32,7 @@ class TC_CGEN_2_4(MatterBaseTest): def OpenCommissioningWindow(self) -> int: try: pin, code = self.th1.OpenCommissioningWindow( - nodeid=self.dut_node_id, timeout=600, iteration=10000, discriminator=self.matter_test_config.discriminator[0], option=1) + nodeid=self.dut_node_id, timeout=600, iteration=10000, discriminator=self.matter_test_config.discriminators[0], option=1) time.sleep(5) return pin, code @@ -51,7 +51,7 @@ async def CommissionToStageSendCompleteAndCleanup( self.th2.SetTestCommissionerPrematureCompleteAfter(stage) success, errcode = self.th2.CommissionOnNetwork( nodeId=self.dut_node_id, setupPinCode=pin, - filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=self.matter_test_config.discriminator[0]) + filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=self.matter_test_config.discriminators[0]) logging.info('Commissioning complete done. Successful? {}, errorcode = {}'.format(success, errcode)) asserts.assert_false(success, 'Commissioning complete did not error as expected') asserts.assert_true(errcode.sdk_part == expectedErrorPart, 'Unexpected error type returned from CommissioningComplete') @@ -91,7 +91,7 @@ async def test_TC_CGEN_2_4(self): self.th2.ResetTestCommissioner() success, errcode = self.th2.CommissionOnNetwork( nodeId=self.dut_node_id, setupPinCode=pin, - filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=self.matter_test_config.discriminator[0]) + filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=self.matter_test_config.discriminators[0]) logging.info('Commissioning complete done. Successful? {}, errorcode = {}'.format(success, errcode)) logging.info('Step 17 - TH1 sends an arm failsafe') diff --git a/src/python_testing/TC_DA_1_7.py b/src/python_testing/TC_DA_1_7.py index b9f3a787390ddb..634dbb8885da2c 100644 --- a/src/python_testing/TC_DA_1_7.py +++ b/src/python_testing/TC_DA_1_7.py @@ -79,6 +79,34 @@ def extract_akid(cert: Certificate) -> Optional[bytes]: class TC_DA_1_7(MatterBaseTest): + ''' TC-DA-1.7 + + This test requires two instances of the DUT with the same PID/VID to confirm that the individual + devices are provisioned with different device attestation keys even in the same product line. + + In order to fully test this locally, it requires two separate instances of the example app + with different keys, different discrimimators, different ports, and different KVSs. + The example apps use the SDK authority key, so the script needs the allow_sdk_dac arg set. + + One suggested method of testing: + + Terminal 1: (first DUT - default port 5540) + rm kvs1 + ${PATH_TO_ALL_CLUSTERS}/chip-all-clusters-app --dac_provider \ + credentials/development/commissioner_dut/struct_cd_authorized_paa_list_count1_valid/test_case_vector.json \ + --product-id 32768 --KVS kvs1 --discriminator 12 + + Terminal 2: (second DUT - port 5541) + rm kvs2 + ${PATH_TO_ALL_CLUSTERS}/chip-all-clusters-app --dac_provider \ + credentials/development/commissioner_dut/struct_cd_authorized_paa_list_count2_valid/test_case_vector.json \ + --product-id 32768 --KVS kvs2 --discriminator 34 --secured-device-port 5541 + + Terminal 3: (test application) + ./scripts/tests/run_python_test.py --script "src/python_testing/TC_DA_1_7.py" \ + --script-args "--storage-path admin_storage.json --commissioning-method on-network \ + --discriminator 12 34 --passcode 20202021 20202021 --bool-arg allow_sdk_dac:true" + ''' @async_test_body async def test_TC_DA_1_7(self): # For real tests, we require more than one DUT @@ -86,12 +114,12 @@ async def test_TC_DA_1_7(self): # To specify more than 1 DUT, use a list of discriminators and passcodes allow_sdk_dac = self.user_params.get("allow_sdk_dac", False) if allow_sdk_dac: - asserts.assert_equal(len(self.matter_test_config.discriminator), 1, "Only one device can be tested with SDK DAC") + asserts.assert_equal(len(self.matter_test_config.discriminators), 1, "Only one device can be tested with SDK DAC") if not allow_sdk_dac: - asserts.assert_equal(len(self.matter_test_config.discriminator), 2, "This test requires 2 DUTs") + asserts.assert_equal(len(self.matter_test_config.discriminators), 2, "This test requires 2 DUTs") pk = [] - for i in range(len(self.matter_test_config.dut_node_id)): - pk.append(await self.single_DUT(i, self.matter_test_config.dut_node_id[i])) + for i in range(len(self.matter_test_config.dut_node_ids)): + pk.append(await self.single_DUT(i, self.matter_test_config.dut_node_ids[i])) asserts.assert_equal(len(pk), len(set(pk)), "Found matching public keys in different DUTs") diff --git a/src/python_testing/TC_RR_1_1.py b/src/python_testing/TC_RR_1_1.py index 895de247c22cb9..98db3c3aae5fbd 100644 --- a/src/python_testing/TC_RR_1_1.py +++ b/src/python_testing/TC_RR_1_1.py @@ -434,6 +434,8 @@ async def test_TC_RR_1_1(self): node_id=self.dut_node_id, endpoint=0, attribute=Clusters.GroupKeyManagement.Attributes.MaxGroupsPerFabric) + logging.info( + f"MaxGroupsPerFabric value: {indicated_max_groups_per_fabric}, number of endpoints with Groups clusters cluster: {counted_groups_clusters}, which are: {list(groups_cluster_endpoints.keys())}") if indicated_max_groups_per_fabric < 4 * counted_groups_clusters: asserts.fail("Failed Step 11: MaxGroupsPerFabric < 4 * counted_groups_clusters") diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index fd8bece2a64dd4..4c1e24e8eb8a21 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -195,45 +195,48 @@ def compare_time(received: int, offset: timedelta = timedelta(), utc: int = None @dataclass class MatterTestConfig: - storage_path: pathlib.Path = None - logs_path: pathlib.Path = None - paa_trust_store_path: pathlib.Path = None - ble_interface_id: int = None + storage_path: pathlib.Path = pathlib.Path(".") + logs_path: pathlib.Path = pathlib.Path(".") + paa_trust_store_path: Optional[pathlib.Path] = None + ble_interface_id: Optional[int] = None commission_only: bool = False admin_vendor_id: int = _DEFAULT_ADMIN_VENDOR_ID - case_admin_subject: int = None + case_admin_subject: Optional[int] = None global_test_params: dict = field(default_factory=dict) # List of explicit tests to run by name. If empty, all tests will run tests: List[str] = field(default_factory=list) - commissioning_method: str = None - discriminator: List[int] = None - setup_passcode: List[int] = None - commissionee_ip_address_just_for_testing: str = None + commissioning_method: Optional[str] = None + discriminators: Optional[List[int]] = None + setup_passcodes: Optional[List[int]] = None + commissionee_ip_address_just_for_testing: Optional[str] = None maximize_cert_chains: bool = False - qr_code_content: str = None - manual_code: str = None + qr_code_content: Optional[str] = None + manual_code: Optional[str] = None - wifi_ssid: str = None - wifi_passphrase: str = None - thread_operational_dataset: str = None + wifi_ssid: Optional[str] = None + wifi_passphrase: Optional[str] = None + thread_operational_dataset: Optional[str] = None + + pics: dict[bool, str] = field(default_factory=dict) # Node ID for basic DUT - dut_node_id: List[int] = None + dut_node_ids: Optional[List[int]] = None # Node ID to use for controller/commissioner controller_node_id: int = _DEFAULT_CONTROLLER_NODE_ID # CAT Tags for default controller/commissioner controller_cat_tags: List[int] = field(default_factory=list) # Fabric ID which to use - fabric_id: int = None + fabric_id: int = 1 + # "Alpha" by default root_of_trust_index: int = _DEFAULT_TRUST_ROOT_INDEX # If this is set, we will reuse root of trust keys at that location - chip_tool_credentials_path: pathlib.Path = None + chip_tool_credentials_path: Optional[pathlib.Path] = None class MatterStackState: @@ -340,7 +343,7 @@ def certificate_authority_manager(self) -> chip.CertificateAuthority.Certificate @property def dut_node_id(self) -> int: - return self.matter_test_config.dut_node_id[0] + return self.matter_test_config.dut_node_ids[0] def check_pics(self, pics_key: str) -> bool: picsd = self.matter_test_config.pics @@ -400,8 +403,8 @@ async def send_single_cmd( result = await dev_ctrl.SendCommand(nodeid=node_id, endpoint=endpoint, payload=cmd, timedRequestTimeoutMs=timedRequestTimeoutMs) return result - def print_step(self, stepnum: typing.Union[int, str], title: str) -> None: - logging.info('***** Test Step {} : {}'.format(stepnum, title)) + def print_step(self, stepnum: int, title: str) -> None: + logging.info('***** Test Step %d : %s', stepnum, title) def generate_mobly_test_config(matter_test_config: MatterTestConfig): @@ -456,6 +459,7 @@ def byte_string_from_hex(s: str) -> bytes: def int_from_manual_code(s: str) -> int: + s = s.replace('-', '') regex = r"^([0-9]{11}|[0-9]{21})$" match = re.match(regex, s) if not match: @@ -560,67 +564,71 @@ def root_index(s: str) -> int: def populate_commissioning_args(args: argparse.Namespace, config: MatterTestConfig) -> bool: - config.dut_node_id = args.dut_node_id + config.root_of_trust_index = args.root_index + # Follow root of trust index if ID not provided to have same behavior as legacy + # chip-tool that fabricID == commissioner_name == root of trust index + config.fabric_id = args.fabric_id if args.fabric_id is not None else config.root_of_trust_index - if args.commissioning_method is None: - return True + if args.chip_tool_credentials_path is not None and not args.chip_tool_credentials_path.exists(): + print("error: chip-tool credentials path %s doesn't exist!" % args.chip_tool_credentials_path) + return False + config.chip_tool_credentials_path = args.chip_tool_credentials_path + + if args.dut_node_ids is None: + print("error: --dut-node-id is mandatory!") + return False + config.dut_node_ids = args.dut_node_ids config.commissioning_method = args.commissioning_method config.commission_only = args.commission_only - if args.dut_node_id is None: - print("error: When --commissioning-method present, --dut-node-id is mandatory!") - return False + # TODO: this should also allow multiple once QR and manual codes are supported. + config.qr_code_content = args.qr_code + if args.manual_code: + config.manual_code = "%d" % args.manual_code + else: + config.manual_code = None - if args.discriminator is None and (args.qr_code is None and args.manual_code is None): + if args.commissioning_method is None: + return True + + if args.discriminators is None and (args.qr_code is None and args.manual_code is None): print("error: Missing --discriminator when no --qr-code/--manual-code present!") return False - config.discriminator = args.discriminator + config.discriminators = args.discriminators - if args.passcode is None and (args.qr_code is None and args.manual_code is None): + if args.passcodes is None and (args.qr_code is None and args.manual_code is None): print("error: Missing --passcode when no --qr-code/--manual-code present!") return False - config.setup_passcode = args.passcode + config.setup_passcodes = args.passcodes if args.qr_code is not None and args.manual_code is not None: print("error: Cannot have both --qr-code and --manual-code present!") return False - if len(config.discriminator) != len(config.setup_passcode): + if len(config.discriminators) != len(config.setup_passcodes): print("error: supplied number of discriminators does not match number of passcodes") return False - if len(config.dut_node_id) > len(config.discriminator): + if len(config.dut_node_ids) > len(config.discriminators): print("error: More node IDs provided than discriminators") return False - if len(config.dut_node_id) < len(config.discriminator): - missing = len(config.discriminator) - len(config.dut_node_id) + if len(config.dut_node_ids) < len(config.discriminators): + missing = len(config.discriminators) - 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): - config.dut_node_id.append(config.dut_node_id[-1] + 1) + config.dut_node_ids.append(config.dut_node_ids[-1] + 1) - if len(config.dut_node_id) != len(set(config.dut_node_id)): + if len(config.dut_node_ids) != len(set(config.dut_node_ids)): print("error: Duplicate values in node id list") return False - if len(config.discriminator) != len(set(config.discriminator)): + if len(config.discriminators) != len(set(config.discriminators)): print("error: Duplicate value in discriminator list") return False - # TODO: this should also allow multiple once QR and manual codes are supported. - config.qr_code_content = args.qr_code - config.manual_code = args.manual_code - - config.root_of_trust_index = args.root_index - # Follow root of trust index if ID not provided to have same behavior as legacy - # chip-tool that fabricID == commissioner_name == root of trust index - config.fabric_id = args.fabric_id if args.fabric_id is not None else config.root_of_trust_index - - if args.chip_tool_credentials_path is not None and not args.chip_tool_credentials_path.exists(): - print("error: chip-tool credentials path %s doesn't exist!" % args.chip_tool_credentials_path) - return False - config.chip_tool_credentials_path = args.chip_tool_credentials_path - if config.commissioning_method == "ble-wifi": if args.wifi_ssid is None: print("error: missing --wifi-ssid for --commissioning-method ble-wifi!") @@ -711,7 +719,7 @@ def parse_matter_test_args(argv: List[str]) -> MatterTestConfig: default=_DEFAULT_CONTROLLER_NODE_ID, help='NodeID to use for initial/default controller (default: %d)' % _DEFAULT_CONTROLLER_NODE_ID) basic_group.add_argument('-n', '--dut-node-id', type=int_decimal_or_hex, - metavar='NODE_ID', default=[_DEFAULT_DUT_NODE_ID], + metavar='NODE_ID', dest='dut_node_ids', default=[_DEFAULT_DUT_NODE_ID], help='Node ID for primary DUT communication, ' 'and NodeID to assign if commissioning (default: %d)' % _DEFAULT_DUT_NODE_ID, nargs="+") basic_group.add_argument("--PICS", help="PICS file path", type=str) @@ -724,9 +732,13 @@ def parse_matter_test_args(argv: List[str]) -> MatterTestConfig: help='Name of commissioning method to use') commission_group.add_argument('-d', '--discriminator', type=int_decimal_or_hex, metavar='LONG_DISCRIMINATOR', + dest='discriminators', + default=[], help='Discriminator to use for commissioning', nargs="+") commission_group.add_argument('-p', '--passcode', type=int_decimal_or_hex, metavar='PASSCODE', + dest='passcodes', + default=[], help='PAKE passcode to use', nargs="+") commission_group.add_argument('-i', '--ip-addr', type=str, metavar='RAW_IP_ADDRESS', @@ -813,12 +825,12 @@ class CommissionDeviceTest(MatterBaseTest): def test_run_commissioning(self): conf = self.matter_test_config - for i in range(len(conf.dut_node_id)): + for commission_idx, node_id in enumerate(conf.dut_node_ids): logging.info("Starting commissioning for root index %d, fabric ID 0x%016X, node ID 0x%016X" % - (conf.root_of_trust_index, conf.fabric_id, conf.dut_node_id[i])) + (conf.root_of_trust_index, conf.fabric_id, node_id)) logging.info("Commissioning method: %s" % conf.commissioning_method) - if not self._commission_device(i): + if not self._commission_device(commission_idx): raise signals.TestAbortAll("Failed to commission node") def _commission_device(self, i) -> bool: @@ -829,31 +841,31 @@ def _commission_device(self, i) -> bool: if conf.commissioning_method == "on-network": return dev_ctrl.CommissionOnNetwork( - nodeId=conf.dut_node_id[i], - setupPinCode=conf.setup_passcode[i], + nodeId=conf.dut_node_ids[i], + setupPinCode=conf.setup_passcodes[i], filterType=DiscoveryFilterType.LONG_DISCRIMINATOR, - filter=conf.discriminator[i] + filter=conf.discriminators[i] ) elif conf.commissioning_method == "ble-wifi": return dev_ctrl.CommissionWiFi( - conf.discriminator[i], - conf.setup_passcode[i], - conf.dut_node_id[i], + conf.discriminators[i], + conf.setup_passcodes[i], + conf.dut_node_ids[i], conf.wifi_ssid, conf.wifi_passphrase ) elif conf.commissioning_method == "ble-thread": return dev_ctrl.CommissionThread( - conf.discriminator[i], - conf.setup_passcode[i], - conf.dut_node_id[i], + conf.discriminators[i], + conf.setup_passcodes[i], + conf.dut_node_ids[i], conf.thread_operational_dataset ) elif conf.commissioning_method == "on-network-ip": 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_passcode[i], nodeid=conf.dut_node_id[i] + setupPinCode=conf.setup_passcodes[i], nodeid=conf.dut_node_ids[i] ) else: raise ValueError("Invalid commissioning method %s!" % conf.commissioning_method) diff --git a/src/system/SystemClock.h b/src/system/SystemClock.h index dfc54e8a12f0e9..d669200ae37000 100644 --- a/src/system/SystemClock.h +++ b/src/system/SystemClock.h @@ -32,9 +32,13 @@ #include #include -#if CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS || CHIP_SYSTEM_CONFIG_USE_SOCKETS +#if CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS || CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS #include -#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS || CHIP_SYSTEM_CONFIG_USE_SOCKETS +#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS || CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS + +#if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS +#include +#endif #include #include diff --git a/src/system/SystemConfig.h b/src/system/SystemConfig.h index 17fbe26101fe32..d0188ca70f46e2 100644 --- a/src/system/SystemConfig.h +++ b/src/system/SystemConfig.h @@ -715,3 +715,51 @@ struct LwIPEvent; #define CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS 0 #endif #endif // CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS + +/** + * @def CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS + * + * @brief + * Use Zephyr socket API. + * + * Defaults to enabled on Zephyr platforms that do not enable Zephyr POSIX layer. + */ +#ifndef CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS +#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && __ZEPHYR__ && CONFIG_NET_SOCKETS_POSIX_NAMES +#define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS 1 +#else +#define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS 0 +#endif +#endif // CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS + +/** + * @def CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS + * + * @brief + * Use POSIX socket API. + * + * Defaults to enabled on platforms that use sockets other than Zephyr sockets. + */ +#ifndef CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS +#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && !CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS +#define CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS 1 +#else +#define CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS 0 +#endif +#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS + +/** + * @def CHIP_SYSTEM_CONFIG_USE_ZEPHYR_EVENTFD + * + * @brief + * Use Zephyr eventfd API. + * + * Defaults to enabled on Zephyr platforms that enable CONFIG_EVENTFD. + */ +#ifndef CHIP_SYSTEM_CONFIG_USE_ZEPHYR_EVENTFD +#if __ZEPHYR__ && CONFIG_EVENTFD +#define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_EVENTFD 1 +#else +#define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_EVENTFD 0 +#endif +#endif // CHIP_SYSTEM_CONFIG_USE_ZEPHYR_EVENTFD diff --git a/src/system/SystemLayerImplSelect.h b/src/system/SystemLayerImplSelect.h index 0eb930eeb86c8d..552e8d9e40163d 100644 --- a/src/system/SystemLayerImplSelect.h +++ b/src/system/SystemLayerImplSelect.h @@ -22,7 +22,13 @@ #pragma once +#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS #include +#endif + +#if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS +#include +#endif #if CHIP_SYSTEM_CONFIG_POSIX_LOCKING #include diff --git a/src/system/WakeEvent.cpp b/src/system/WakeEvent.cpp index ab115025006d03..4b5d7c2a9ad00f 100644 --- a/src/system/WakeEvent.cpp +++ b/src/system/WakeEvent.cpp @@ -38,8 +38,12 @@ #include #if !CHIP_SYSTEM_CONFIG_USE_POSIX_PIPE +#if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_EVENTFD +#include +#else #include #endif +#endif // !CHIP_SYSTEM_CONFIG_USE_POSIX_PIPE namespace chip { namespace System { @@ -122,6 +126,42 @@ CHIP_ERROR WakeEvent::Notify() const #else // CHIP_SYSTEM_CONFIG_USE_POSIX_PIPE +namespace { + +#if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_EVENTFD + +int ReadEvent(int eventFd) +{ + eventfd_t value; + + return eventfd_read(eventFd, &value); +} + +int WriteEvent(int eventFd) +{ + return eventfd_write(eventFd, 1); +} + +#else + +ssize_t ReadEvent(int eventFd) +{ + uint64_t value; + + return ::read(eventFd, &value, sizeof(value)); +} + +ssize_t WriteEvent(int eventFd) +{ + uint64_t value = 1; + + return ::write(eventFd, &value, sizeof(value)); +} + +#endif + +} // namespace + CHIP_ERROR WakeEvent::Open(LayerSockets & systemLayer) { mReadFD = ::eventfd(0, 0); @@ -146,9 +186,7 @@ void WakeEvent::Close(LayerSockets & systemLayer) void WakeEvent::Confirm() const { - uint64_t value; - - if (::read(mReadFD, &value, sizeof(value)) < 0 && errno != EAGAIN && errno != EWOULDBLOCK) + if (ReadEvent(mReadFD) < 0 && errno != EAGAIN && errno != EWOULDBLOCK) { ChipLogError(chipSystemLayer, "System wake event confirm failed: %" CHIP_ERROR_FORMAT, CHIP_ERROR_POSIX(errno).Format()); } @@ -156,9 +194,7 @@ void WakeEvent::Confirm() const CHIP_ERROR WakeEvent::Notify() const { - uint64_t value = 1; - - if (::write(mReadFD, &value, sizeof(value)) < 0 && errno != EAGAIN && errno != EWOULDBLOCK) + if (WriteEvent(mReadFD) < 0 && errno != EAGAIN && errno != EWOULDBLOCK) { return CHIP_ERROR_POSIX(errno); } diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index 45350b66503b08..c2f5b087c8524e 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit 45350b66503b08cafc8aa4f42a2875aca0f0e062 +Subproject commit c2f5b087c8524e9508b46afd6275561dc998e7eb diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index d6b036c2c385b8..7c875693d478ac 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit d6b036c2c385b8934e83d6d4d258870ccfcc1e08 +Subproject commit 7c875693d478ac0da2f358a1542a4fc1cad1b60d diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 5f24b15d1653dc..7d95541b504db2 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -6952,7 +6952,7 @@ namespace Description { EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - uint8_t zclString[32 + 1]; + uint8_t zclString[64 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); size_t length = emberAfStringLength(zclString); @@ -6961,16 +6961,16 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); value.reduce_size(length); return status; } EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); @@ -7020,17 +7020,1180 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace StandardNamespace + +namespace CurrentMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentMode + +namespace StartUpMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace StartUpMode + +namespace OnMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace OnMode + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ModeSelect + +namespace LaundryWasherModeSelect { +namespace Attributes { + +namespace Description { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace Description + +namespace CurrentMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentMode + +namespace StartUpMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace StartUpMode + +namespace OnMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace OnMode + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace LaundryWasherModeSelect + +namespace RefrigeratorAndTemperatureControlledCabinetModeSelect { +namespace Attributes { + +namespace Description { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, + zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, zclString, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace Description + +namespace CurrentMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, + readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, writable, + ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentMode + +namespace StartUpMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, + readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, writable, + ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, writable, + ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace StartUpMode + +namespace OnMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, + readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, writable, + ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, writable, + ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace OnMode + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, + readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, + readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RefrigeratorAndTemperatureControlledCabinetModeSelect + +namespace WasherControls { +namespace Attributes { + +namespace SpinSpeedCurrent { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace SpinSpeedCurrent + +namespace NumberOfRinses { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NumberOfRinses + +namespace MaxRinses { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace MaxRinses + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace WasherControls + +namespace RvcRunModeSelect { +namespace Attributes { + +namespace Description { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace Description + +namespace CurrentMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentMode + +namespace StartUpMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace StartUpMode + +namespace OnMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace OnMode + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RvcRunModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RvcRunModeSelect + +namespace RvcCleanModeSelect { +namespace Attributes { + +namespace Description { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - if (value.IsNull()) + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { - return SetNull(endpoint); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - return Set(endpoint, value.Value()); + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace StandardNamespace +} // namespace Description namespace CurrentMode { @@ -7039,7 +8202,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7058,7 +8221,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } } // namespace CurrentMode @@ -7070,7 +8233,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & valu using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (Traits::IsNullValue(temp)) { @@ -7092,7 +8255,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -7101,7 +8264,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -7123,7 +8286,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & valu using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (Traits::IsNullValue(temp)) { @@ -7145,7 +8308,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -7154,7 +8317,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -7176,7 +8339,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7195,7 +8358,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -7207,7 +8370,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7226,13 +8389,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::RvcCleanModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace ModeSelect +} // namespace RvcCleanModeSelect namespace TemperatureControl { namespace Attributes { @@ -7263,7 +8426,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace TemperatureSetpoint @@ -7294,7 +8457,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace MinTemperature @@ -7325,7 +8488,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace MaxTemperature @@ -7356,12 +8519,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace Step -namespace CurrentTemperatureLevelIndex { +namespace SelectedTemperatureLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { @@ -7390,7 +8553,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace CurrentTemperatureLevelIndex +} // namespace SelectedTemperatureLevel namespace FeatureMap { @@ -7491,7 +8654,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask * value) { @@ -7520,13 +8683,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, readable, sizeof(temp)); @@ -7538,9 +8701,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -7551,7 +8714,212 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RefrigeratorAlarm + +namespace DishwasherModeSelect { +namespace Attributes { + +namespace Description { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace Description + +namespace CurrentMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentMode + +namespace StartUpMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace StartUpMode + +namespace OnMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace OnMode namespace FeatureMap { @@ -7560,7 +8928,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7579,7 +8947,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -7591,7 +8959,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7610,13 +8978,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace RefrigeratorAlarm +} // namespace DishwasherModeSelect namespace AirQuality { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index d0a536d149e604..43bbc64c943f50 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -1382,33 +1382,228 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace ModeSelect +namespace LaundryWasherModeSelect { +namespace Attributes { + +namespace Description { +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +} // namespace Description + +namespace CurrentMode { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace CurrentMode + +namespace StartUpMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace StartUpMode + +namespace OnMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace OnMode + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace LaundryWasherModeSelect + +namespace RefrigeratorAndTemperatureControlledCabinetModeSelect { +namespace Attributes { + +namespace Description { +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +} // namespace Description + +namespace CurrentMode { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace CurrentMode + +namespace StartUpMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace StartUpMode + +namespace OnMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace OnMode + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RefrigeratorAndTemperatureControlledCabinetModeSelect + +namespace WasherControls { +namespace Attributes { + +namespace SpinSpeedCurrent { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace SpinSpeedCurrent + +namespace NumberOfRinses { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace NumberOfRinses + +namespace MaxRinses { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace MaxRinses + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace WasherControls + +namespace RvcRunModeSelect { +namespace Attributes { + +namespace Description { +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +} // namespace Description + +namespace CurrentMode { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace CurrentMode + +namespace StartUpMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace StartUpMode + +namespace OnMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace OnMode + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RvcRunModeSelect + +namespace RvcCleanModeSelect { +namespace Attributes { + +namespace Description { +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +} // namespace Description + +namespace CurrentMode { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace CurrentMode + +namespace StartUpMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace StartUpMode + +namespace OnMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace OnMode + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RvcCleanModeSelect + namespace TemperatureControl { namespace Attributes { namespace TemperatureSetpoint { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace TemperatureSetpoint namespace MinTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace MinTemperature namespace MaxTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace MaxTemperature namespace Step { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace Step -namespace CurrentTemperatureLevelIndex { +namespace SelectedTemperatureLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace CurrentTemperatureLevelIndex +} // namespace SelectedTemperatureLevel namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 @@ -1431,11 +1626,6 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask value); } // namespace Mask -namespace Latch { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmMap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); -} // namespace Latch - namespace State { EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmMap EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); @@ -1454,6 +1644,46 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace RefrigeratorAlarm +namespace DishwasherModeSelect { +namespace Attributes { + +namespace Description { +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +} // namespace Description + +namespace CurrentMode { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace CurrentMode + +namespace StartUpMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace StartUpMode + +namespace OnMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace OnMode + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DishwasherModeSelect + namespace AirQuality { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index cf4da888a6982f..5df828f260f298 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -369,6 +369,46 @@ void emberAfIcdManagementClusterInitCallback(chip::EndpointId endpoint); */ void emberAfModeSelectClusterInitCallback(chip::EndpointId endpoint); +/** @brief Laundry Washer Mode Select Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfLaundryWasherModeSelectClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Refrigerator And Temperature Controlled Cabinet Mode Select Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfRefrigeratorAndTemperatureControlledCabinetModeSelectClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Washer Controls Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfWasherControlsClusterInitCallback(chip::EndpointId endpoint); + +/** @brief RVC Run Mode Select Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfRvcRunModeSelectClusterInitCallback(chip::EndpointId endpoint); + +/** @brief RVC Clean Mode Select Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfRvcCleanModeSelectClusterInitCallback(chip::EndpointId endpoint); + /** @brief Temperature Control Cluster Init * * Cluster Init @@ -385,6 +425,14 @@ void emberAfTemperatureControlClusterInitCallback(chip::EndpointId endpoint); */ void emberAfRefrigeratorAlarmClusterInitCallback(chip::EndpointId endpoint); +/** @brief Dishwasher Mode Select Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDishwasherModeSelectClusterInitCallback(chip::EndpointId endpoint); + /** @brief Air Quality Cluster Init * * Cluster Init @@ -4272,6 +4320,393 @@ void emberAfModeSelectClusterServerTickCallback(chip::EndpointId endpoint); */ void emberAfModeSelectClusterClientTickCallback(chip::EndpointId endpoint); +// +// Laundry Washer Mode Select Cluster +// + +/** @brief Laundry Washer Mode Select Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfLaundryWasherModeSelectClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Laundry Washer Mode Select Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterLaundryWasherModeSelectClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Laundry Washer Mode Select Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfLaundryWasherModeSelectClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Laundry Washer Mode Select Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterLaundryWasherModeSelectClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Laundry Washer Mode Select Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterLaundryWasherModeSelectClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Laundry Washer Mode Select Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterLaundryWasherModeSelectClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Laundry Washer Mode Select Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfLaundryWasherModeSelectClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Laundry Washer Mode Select Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfLaundryWasherModeSelectClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Refrigerator And Temperature Controlled Cabinet Mode Select Cluster +// + +/** @brief Refrigerator And Temperature Controlled Cabinet Mode Select Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfRefrigeratorAndTemperatureControlledCabinetModeSelectClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Refrigerator And Temperature Controlled Cabinet Mode Select Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterRefrigeratorAndTemperatureControlledCabinetModeSelectClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Refrigerator And Temperature Controlled Cabinet Mode Select Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfRefrigeratorAndTemperatureControlledCabinetModeSelectClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Refrigerator And Temperature Controlled Cabinet Mode Select Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterRefrigeratorAndTemperatureControlledCabinetModeSelectClusterServerAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Refrigerator And Temperature Controlled Cabinet Mode Select Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterRefrigeratorAndTemperatureControlledCabinetModeSelectClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Refrigerator And Temperature Controlled Cabinet Mode Select Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterRefrigeratorAndTemperatureControlledCabinetModeSelectClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Refrigerator And Temperature Controlled Cabinet Mode Select Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfRefrigeratorAndTemperatureControlledCabinetModeSelectClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Refrigerator And Temperature Controlled Cabinet Mode Select Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfRefrigeratorAndTemperatureControlledCabinetModeSelectClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Washer Controls Cluster +// + +/** @brief Washer Controls Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfWasherControlsClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Washer Controls Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterWasherControlsClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Washer Controls Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfWasherControlsClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Washer Controls Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterWasherControlsClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Washer Controls Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterWasherControlsClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Washer Controls Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterWasherControlsClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Washer Controls Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfWasherControlsClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Washer Controls Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfWasherControlsClusterClientTickCallback(chip::EndpointId endpoint); + +// +// RVC Run Mode Select Cluster +// + +/** @brief RVC Run Mode Select Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfRvcRunModeSelectClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief RVC Run Mode Select Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterRvcRunModeSelectClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief RVC Run Mode Select Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfRvcRunModeSelectClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief RVC Run Mode Select Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterRvcRunModeSelectClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief RVC Run Mode Select Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterRvcRunModeSelectClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief RVC Run Mode Select Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterRvcRunModeSelectClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief RVC Run Mode Select Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfRvcRunModeSelectClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief RVC Run Mode Select Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfRvcRunModeSelectClusterClientTickCallback(chip::EndpointId endpoint); + +// +// RVC Clean Mode Select Cluster +// + +/** @brief RVC Clean Mode Select Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfRvcCleanModeSelectClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief RVC Clean Mode Select Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterRvcCleanModeSelectClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief RVC Clean Mode Select Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfRvcCleanModeSelectClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief RVC Clean Mode Select Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterRvcCleanModeSelectClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief RVC Clean Mode Select Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterRvcCleanModeSelectClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief RVC Clean Mode Select Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterRvcCleanModeSelectClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief RVC Clean Mode Select Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfRvcCleanModeSelectClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief RVC Clean Mode Select Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfRvcCleanModeSelectClusterClientTickCallback(chip::EndpointId endpoint); + // // Temperature Control Cluster // @@ -4426,6 +4861,82 @@ void emberAfRefrigeratorAlarmClusterServerTickCallback(chip::EndpointId endpoint */ void emberAfRefrigeratorAlarmClusterClientTickCallback(chip::EndpointId endpoint); +// +// Dishwasher Mode Select Cluster +// + +/** @brief Dishwasher Mode Select Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDishwasherModeSelectClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Dishwasher Mode Select Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterDishwasherModeSelectClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Dishwasher Mode Select Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDishwasherModeSelectClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Dishwasher Mode Select Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterDishwasherModeSelectClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Dishwasher Mode Select Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterDishwasherModeSelectClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Dishwasher Mode Select Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterDishwasherModeSelectClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Dishwasher Mode Select Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfDishwasherModeSelectClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Dishwasher Mode Select Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfDishwasherModeSelectClusterClientTickCallback(chip::EndpointId endpoint); + // // Air Quality Cluster // @@ -11115,6 +11626,62 @@ bool emberAfIcdManagementClusterStayActiveRequestCallback( bool emberAfModeSelectClusterChangeToModeCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::ModeSelect::Commands::ChangeToMode::DecodableType & commandData); +/** + * @brief Mode Select Cluster ChangeToModeWithStatus Command callback (from client) + */ +bool emberAfModeSelectClusterChangeToModeWithStatusCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ModeSelect::Commands::ChangeToModeWithStatus::DecodableType & commandData); +/** + * @brief Laundry Washer Mode Select Cluster ChangeToMode Command callback (from client) + */ +bool emberAfLaundryWasherModeSelectClusterChangeToModeCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::LaundryWasherModeSelect::Commands::ChangeToMode::DecodableType & commandData); +/** + * @brief Laundry Washer Mode Select Cluster ChangeToModeWithStatus Command callback (from client) + */ +bool emberAfLaundryWasherModeSelectClusterChangeToModeWithStatusCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::LaundryWasherModeSelect::Commands::ChangeToModeWithStatus::DecodableType & commandData); +/** + * @brief Refrigerator And Temperature Controlled Cabinet Mode Select Cluster ChangeToMode Command callback (from client) + */ +bool emberAfRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Commands::ChangeToMode::DecodableType & + commandData); +/** + * @brief Refrigerator And Temperature Controlled Cabinet Mode Select Cluster ChangeToModeWithStatus Command callback (from client) + */ +bool emberAfRefrigeratorAndTemperatureControlledCabinetModeSelectClusterChangeToModeWithStatusCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Commands::ChangeToModeWithStatus:: + DecodableType & commandData); +/** + * @brief RVC Run Mode Select Cluster ChangeToMode Command callback (from client) + */ +bool emberAfRvcRunModeSelectClusterChangeToModeCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::RvcRunModeSelect::Commands::ChangeToMode::DecodableType & commandData); +/** + * @brief RVC Run Mode Select Cluster ChangeToModeWithStatus Command callback (from client) + */ +bool emberAfRvcRunModeSelectClusterChangeToModeWithStatusCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::RvcRunModeSelect::Commands::ChangeToModeWithStatus::DecodableType & commandData); +/** + * @brief RVC Clean Mode Select Cluster ChangeToMode Command callback (from client) + */ +bool emberAfRvcCleanModeSelectClusterChangeToModeCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::RvcCleanModeSelect::Commands::ChangeToMode::DecodableType & commandData); +/** + * @brief RVC Clean Mode Select Cluster ChangeToModeWithStatus Command callback (from client) + */ +bool emberAfRvcCleanModeSelectClusterChangeToModeWithStatusCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::RvcCleanModeSelect::Commands::ChangeToModeWithStatus::DecodableType & commandData); /** * @brief Temperature Control Cluster SetTemperature Command callback (from client) */ @@ -11122,11 +11689,17 @@ bool emberAfTemperatureControlClusterSetTemperatureCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::TemperatureControl::Commands::SetTemperature::DecodableType & commandData); /** - * @brief Refrigerator Alarm Cluster Reset Command callback (from client) + * @brief Dishwasher Mode Select Cluster ChangeToMode Command callback (from client) + */ +bool emberAfDishwasherModeSelectClusterChangeToModeCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DishwasherModeSelect::Commands::ChangeToMode::DecodableType & commandData); +/** + * @brief Dishwasher Mode Select Cluster ChangeToModeWithStatus Command callback (from client) */ -bool emberAfRefrigeratorAlarmClusterResetCallback( +bool emberAfDishwasherModeSelectClusterChangeToModeWithStatusCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::RefrigeratorAlarm::Commands::Reset::DecodableType & commandData); + const chip::app::Clusters::DishwasherModeSelect::Commands::ChangeToModeWithStatus::DecodableType & commandData); /** * @brief Smoke CO Alarm Cluster SelfTestRequest Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index a89a22f776c552..843538b9e1e2a3 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -1237,6 +1237,138 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(GroupKeyManagement::Gro } } +static auto __attribute__((unused)) EnsureKnownEnumValue(ModeSelect::ModeTag val) +{ + using EnumType = ModeSelect::ModeTag; + switch (val) + { + case EnumType::kAuto: + case EnumType::kQuick: + case EnumType::kQuiet: + case EnumType::kLowNoise: + case EnumType::kLowEnergy: + case EnumType::kVacation: + case EnumType::kMin: + case EnumType::kMax: + case EnumType::kNight: + case EnumType::kDay: + return val; + default: + return static_cast(10); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(ModeSelect::StatusCode val) +{ + using EnumType = ModeSelect::StatusCode; + switch (val) + { + case EnumType::kSuccess: + case EnumType::kUnsupportedMode: + case EnumType::kGenericFailure: + return val; + default: + return static_cast(3); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(LaundryWasherModeSelect::ModeTag val) +{ + using EnumType = LaundryWasherModeSelect::ModeTag; + switch (val) + { + case EnumType::kNormal: + case EnumType::kDelicate: + case EnumType::kHeavy: + case EnumType::kWhites: + return val; + default: + return static_cast(0); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(RefrigeratorAndTemperatureControlledCabinetModeSelect::ModeTag val) +{ + using EnumType = RefrigeratorAndTemperatureControlledCabinetModeSelect::ModeTag; + switch (val) + { + case EnumType::kRapidCool: + case EnumType::kRapidFreeze: + return val; + default: + return static_cast(0); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(RvcRunModeSelect::ModeTag val) +{ + using EnumType = RvcRunModeSelect::ModeTag; + switch (val) + { + case EnumType::kIdle: + case EnumType::kCleaning: + return val; + default: + return static_cast(0); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(RvcRunModeSelect::StatusCode val) +{ + using EnumType = RvcRunModeSelect::StatusCode; + switch (val) + { + case EnumType::kStuck: + case EnumType::kDustBinMissing: + case EnumType::kDustBinFull: + case EnumType::kWaterTankEmpty: + case EnumType::kWaterTankMissing: + case EnumType::kWaterTankLidOpen: + case EnumType::kMopCleaningPadMissing: + case EnumType::kBatteryLow: + return val; + default: + return static_cast(0); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(RvcCleanModeSelect::ModeTag val) +{ + using EnumType = RvcCleanModeSelect::ModeTag; + switch (val) + { + case EnumType::kDeepClean: + case EnumType::kVacuum: + case EnumType::kMop: + return val; + default: + return static_cast(0); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(RvcCleanModeSelect::StatusCode val) +{ + using EnumType = RvcCleanModeSelect::StatusCode; + switch (val) + { + case EnumType::kCleaningInProgress: + return val; + default: + return static_cast(0); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(DishwasherModeSelect::ModeTag val) +{ + using EnumType = DishwasherModeSelect::ModeTag; + switch (val) + { + case EnumType::kNormal: + case EnumType::kHeavy: + case EnumType::kLight: + return val; + default: + return static_cast(0); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(AirQuality::AirQualityEnum val) { using EnumType = AirQuality::AirQualityEnum; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 34679c83ac976a..0d755baec83fee 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -186,8 +186,8 @@ enum class MoveMode : uint8_t kUnknownEnumValue = 2, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MoveMode = EmberAfMoveMode; -static MoveMode __attribute__((unused)) kMoveModekUnknownEnumValue = static_cast(2); +using MoveMode = EmberAfMoveMode; +static MoveMode __attribute__((unused)) kMoveModekUnknownEnumValue = static_cast(2); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Need to convert consumers to using the new enum classes, so we @@ -205,8 +205,8 @@ enum class StepMode : uint8_t kUnknownEnumValue = 2, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using StepMode = EmberAfStepMode; -static StepMode __attribute__((unused)) kStepModekUnknownEnumValue = static_cast(2); +using StepMode = EmberAfStepMode; +static StepMode __attribute__((unused)) kStepModekUnknownEnumValue = static_cast(2); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Bitmap for Feature @@ -1050,8 +1050,8 @@ enum class RadioFaultEnum : uint8_t kUnknownEnumValue = 7, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using RadioFaultEnum = EmberAfRadioFaultEnum; -static RadioFaultEnum __attribute__((unused)) kRadioFaultEnumkUnknownEnumValue = static_cast(7); +using RadioFaultEnum = EmberAfRadioFaultEnum; +static RadioFaultEnum __attribute__((unused)) kRadioFaultEnumkUnknownEnumValue = static_cast(7); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM } // namespace GeneralDiagnostics @@ -1213,8 +1213,8 @@ enum class PHYRateEnum : uint8_t kUnknownEnumValue = 10, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using PHYRateEnum = EmberAfPHYRateEnum; -static PHYRateEnum __attribute__((unused)) kPHYRateEnumkUnknownEnumValue = static_cast(10); +using PHYRateEnum = EmberAfPHYRateEnum; +static PHYRateEnum __attribute__((unused)) kPHYRateEnumkUnknownEnumValue = static_cast(10); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Bitmap for Feature @@ -1468,13 +1468,177 @@ enum class Feature : uint32_t namespace ModeSelect { +// Enum for ModeTag +enum class ModeTag : uint16_t +{ + kAuto = 0x00, + kQuick = 0x01, + kQuiet = 0x02, + kLowNoise = 0x03, + kLowEnergy = 0x04, + kVacation = 0x05, + kMin = 0x06, + kMax = 0x07, + kNight = 0x08, + kDay = 0x09, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 10, +}; + +// Enum for StatusCode +enum class StatusCode : uint8_t +{ + kSuccess = 0x00, + kUnsupportedMode = 0x01, + kGenericFailure = 0x02, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, +}; + // Bitmap for Feature enum class Feature : uint32_t { - kDeponoff = 0x1, + kOnOff = 0x1, + kExtendedStatus = 0x2, }; } // namespace ModeSelect +namespace LaundryWasherModeSelect { + +// Enum for ModeTag +enum class ModeTag : uint16_t +{ + kNormal = 0x4000, + kDelicate = 0x4001, + kHeavy = 0x4002, + kWhites = 0x4003, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kOnOff = 0x1, + kExtendedStatus = 0x2, +}; +} // namespace LaundryWasherModeSelect + +namespace RefrigeratorAndTemperatureControlledCabinetModeSelect { + +// Enum for ModeTag +enum class ModeTag : uint16_t +{ + kRapidCool = 0x4000, + kRapidFreeze = 0x4001, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kOnOff = 0x1, + kExtendedStatus = 0x2, +}; +} // namespace RefrigeratorAndTemperatureControlledCabinetModeSelect + +namespace WasherControls { + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kSpin = 0x1, + kRinse = 0x2, +}; +} // namespace WasherControls + +namespace RvcRunModeSelect { + +// Enum for ModeTag +enum class ModeTag : uint16_t +{ + kIdle = 0x4000, + kCleaning = 0x4001, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, +}; + +// Enum for StatusCode +enum class StatusCode : uint8_t +{ + kStuck = 0x41, + kDustBinMissing = 0x42, + kDustBinFull = 0x43, + kWaterTankEmpty = 0x44, + kWaterTankMissing = 0x45, + kWaterTankLidOpen = 0x46, + kMopCleaningPadMissing = 0x47, + kBatteryLow = 0x48, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kOnOff = 0x1, + kExtendedStatus = 0x2, +}; +} // namespace RvcRunModeSelect + +namespace RvcCleanModeSelect { + +// Enum for ModeTag +enum class ModeTag : uint16_t +{ + kDeepClean = 0x4000, + kVacuum = 0x4001, + kMop = 0x4002, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, +}; + +// Enum for StatusCode +enum class StatusCode : uint8_t +{ + kCleaningInProgress = 0x40, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kOnOff = 0x1, + kExtendedStatus = 0x2, +}; +} // namespace RvcCleanModeSelect + namespace TemperatureControl { // Bitmap for Feature @@ -1482,6 +1646,7 @@ enum class Feature : uint32_t { kTemperatureNumber = 0x1, kTemperatureLevel = 0x2, + kTemperatureStep = 0x4, }; } // namespace TemperatureControl @@ -1494,6 +1659,29 @@ enum class AlarmMap : uint32_t }; } // namespace RefrigeratorAlarm +namespace DishwasherModeSelect { + +// Enum for ModeTag +enum class ModeTag : uint16_t +{ + kNormal = 0x4000, + kHeavy = 0x4001, + kLight = 0x4002, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kOnOff = 0x1, + kExtendedStatus = 0x2, +}; +} // namespace DishwasherModeSelect + namespace AirQuality { // Enum for AirQualityEnum @@ -2985,8 +3173,8 @@ enum class ColorMode : uint8_t kUnknownEnumValue = 3, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorMode = EmberAfColorMode; -static ColorMode __attribute__((unused)) kColorModekUnknownEnumValue = static_cast(3); +using ColorMode = EmberAfColorMode; +static ColorMode __attribute__((unused)) kColorModekUnknownEnumValue = static_cast(3); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for HueDirection diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 0378afc94fc072..ffc13c37e3fe2a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -26,6 +26,102 @@ namespace Clusters { namespace detail { // Structs shared across multiple clusters. namespace Structs { +namespace ModeTagStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMfgCode), mfgCode)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kValue), value)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTagName), tagName)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kMfgCode): + ReturnErrorOnFailure(DataModel::Decode(reader, mfgCode)); + break; + case to_underlying(Fields::kValue): + ReturnErrorOnFailure(DataModel::Decode(reader, value)); + break; + case to_underlying(Fields::kTagName): + ReturnErrorOnFailure(DataModel::Decode(reader, tagName)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; +} + +} // namespace ModeTagStruct +namespace ModeOptionStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLabel), label)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMode), mode)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kModeTags), modeTags)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kLabel): + ReturnErrorOnFailure(DataModel::Decode(reader, label)); + break; + case to_underlying(Fields::kMode): + ReturnErrorOnFailure(DataModel::Decode(reader, mode)); + break; + case to_underlying(Fields::kModeTags): + ReturnErrorOnFailure(DataModel::Decode(reader, modeTags)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; +} + +} // namespace ModeOptionStruct namespace ApplicationStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { @@ -10554,7 +10650,6 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupKeySetIDs), groupKeySetIDs)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10573,9 +10668,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupKeySetIDs): - ReturnErrorOnFailure(DataModel::Decode(reader, groupKeySetIDs)); - break; default: break; } @@ -11243,14 +11335,15 @@ namespace Events {} // namespace Events } // namespace IcdManagement namespace ModeSelect { -namespace Structs { -namespace SemanticTagStruct { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace ChangeToMode { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMfgCode), mfgCode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kValue), value)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11260,8 +11353,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVType outer; VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); + ReturnErrorOnFailure(reader.EnterContainer(outer)); while ((err = reader.Next()) == CHIP_NO_ERROR) { if (!TLV::IsContextTag(reader.GetTag())) @@ -11270,11 +11362,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kMfgCode): - ReturnErrorOnFailure(DataModel::Decode(reader, mfgCode)); - break; - case to_underlying(Fields::kValue): - ReturnErrorOnFailure(DataModel::Decode(reader, value)); + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); break; default: break; @@ -11283,19 +11372,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) VerifyOrReturnError(err == CHIP_END_OF_TLV, err); ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; } - -} // namespace SemanticTagStruct -namespace ModeOptionStruct { +} // namespace ChangeToMode. +namespace ChangeToModeWithStatus { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLabel), label)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMode), mode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSemanticTags), semanticTags)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11305,8 +11390,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVType outer; VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); + ReturnErrorOnFailure(reader.EnterContainer(outer)); while ((err = reader.Next()) == CHIP_NO_ERROR) { if (!TLV::IsContextTag(reader.GetTag())) @@ -11315,14 +11399,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kLabel): - ReturnErrorOnFailure(DataModel::Decode(reader, label)); - break; - case to_underlying(Fields::kMode): - ReturnErrorOnFailure(DataModel::Decode(reader, mode)); - break; - case to_underlying(Fields::kSemanticTags): - ReturnErrorOnFailure(DataModel::Decode(reader, semanticTags)); + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); break; default: break; @@ -11331,20 +11409,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) VerifyOrReturnError(err == CHIP_END_OF_TLV, err); ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; } - -} // namespace ModeOptionStruct -} // namespace Structs - -namespace Commands { -namespace ChangeToMode { +} // namespace ChangeToModeWithStatus. +namespace ChangeToModeResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusText), statusText)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11363,8 +11437,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kNewMode): - ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); + case to_underlying(Fields::kStatus): + ReturnErrorOnFailure(DataModel::Decode(reader, status)); + break; + case to_underlying(Fields::kStatusText): + ReturnErrorOnFailure(DataModel::Decode(reader, statusText)); break; default: break; @@ -11375,7 +11452,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(reader.ExitContainer(outer)); return CHIP_NO_ERROR; } -} // namespace ChangeToMode. +} // namespace ChangeToModeResponse. } // namespace Commands namespace Attributes { @@ -11430,15 +11507,16 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace ModeSelect -namespace TemperatureControl { -namespace Structs { -namespace TemperatureLevelStruct { +namespace LaundryWasherModeSelect { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace ChangeToMode { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLabel), label)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTemperatureLevel), temperatureLevel)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11448,8 +11526,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVType outer; VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); + ReturnErrorOnFailure(reader.EnterContainer(outer)); while ((err = reader.Next()) == CHIP_NO_ERROR) { if (!TLV::IsContextTag(reader.GetTag())) @@ -11458,25 +11535,709 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kLabel): - ReturnErrorOnFailure(DataModel::Decode(reader, label)); + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToMode. +namespace ChangeToModeWithStatus { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToModeWithStatus. +namespace ChangeToModeResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusText), statusText)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kStatus): + ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kTemperatureLevel): - ReturnErrorOnFailure(DataModel::Decode(reader, temperatureLevel)); + case to_underlying(Fields::kStatusText): + ReturnErrorOnFailure(DataModel::Decode(reader, statusText)); break; default: break; } } - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToModeResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Description::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, description)); + break; + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, supportedModes)); + break; + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, currentMode)); + break; + case Attributes::StartUpMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, startUpMode)); + break; + case Attributes::OnMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, onMode)); + break; + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); + break; + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, acceptedCommandList)); + break; + case Attributes::EventList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, eventList)); + break; + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, attributeList)); + break; + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, featureMap)); + break; + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterRevision)); + break; + default: + break; + } + + return CHIP_NO_ERROR; +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace LaundryWasherModeSelect +namespace RefrigeratorAndTemperatureControlledCabinetModeSelect { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace ChangeToMode { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToMode. +namespace ChangeToModeWithStatus { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToModeWithStatus. +namespace ChangeToModeResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusText), statusText)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kStatus): + ReturnErrorOnFailure(DataModel::Decode(reader, status)); + break; + case to_underlying(Fields::kStatusText): + ReturnErrorOnFailure(DataModel::Decode(reader, statusText)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToModeResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Description::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, description)); + break; + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, supportedModes)); + break; + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, currentMode)); + break; + case Attributes::StartUpMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, startUpMode)); + break; + case Attributes::OnMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, onMode)); + break; + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); + break; + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, acceptedCommandList)); + break; + case Attributes::EventList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, eventList)); + break; + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, attributeList)); + break; + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, featureMap)); + break; + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterRevision)); + break; + default: + break; + } + + return CHIP_NO_ERROR; +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace RefrigeratorAndTemperatureControlledCabinetModeSelect +namespace WasherControls { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::SpinSpeeds::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, spinSpeeds)); + break; + case Attributes::SpinSpeedCurrent::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, spinSpeedCurrent)); + break; + case Attributes::NumberOfRinses::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, numberOfRinses)); + break; + case Attributes::MaxRinses::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, maxRinses)); + break; + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); + break; + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, acceptedCommandList)); + break; + case Attributes::EventList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, eventList)); + break; + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, attributeList)); + break; + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, featureMap)); + break; + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterRevision)); + break; + default: + break; + } + + return CHIP_NO_ERROR; +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace WasherControls +namespace RvcRunModeSelect { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace ChangeToMode { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToMode. +namespace ChangeToModeWithStatus { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToModeWithStatus. +namespace ChangeToModeResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusText), statusText)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kStatus): + ReturnErrorOnFailure(DataModel::Decode(reader, status)); + break; + case to_underlying(Fields::kStatusText): + ReturnErrorOnFailure(DataModel::Decode(reader, statusText)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToModeResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Description::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, description)); + break; + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, supportedModes)); + break; + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, currentMode)); + break; + case Attributes::StartUpMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, startUpMode)); + break; + case Attributes::OnMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, onMode)); + break; + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); + break; + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, acceptedCommandList)); + break; + case Attributes::EventList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, eventList)); + break; + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, attributeList)); + break; + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, featureMap)); + break; + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterRevision)); + break; + default: + break; + } + + return CHIP_NO_ERROR; +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace RvcRunModeSelect +namespace RvcCleanModeSelect { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace ChangeToMode { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToMode. +namespace ChangeToModeWithStatus { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToModeWithStatus. +namespace ChangeToModeResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusText), statusText)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kStatus): + ReturnErrorOnFailure(DataModel::Decode(reader, status)); + break; + case to_underlying(Fields::kStatusText): + ReturnErrorOnFailure(DataModel::Decode(reader, statusText)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToModeResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Description::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, description)); + break; + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, supportedModes)); + break; + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, currentMode)); + break; + case Attributes::StartUpMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, startUpMode)); + break; + case Attributes::OnMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, onMode)); + break; + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); + break; + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, acceptedCommandList)); + break; + case Attributes::EventList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, eventList)); + break; + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, attributeList)); + break; + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, featureMap)); + break; + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterRevision)); + break; + default: + break; + } + return CHIP_NO_ERROR; } +} // namespace Attributes -} // namespace TemperatureLevelStruct -} // namespace Structs +namespace Events {} // namespace Events + +} // namespace RvcCleanModeSelect +namespace TemperatureControl { namespace Commands { namespace SetTemperature { @@ -11539,8 +12300,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::Step::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, step)); break; - case Attributes::CurrentTemperatureLevelIndex::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, currentTemperatureLevelIndex)); + case Attributes::SelectedTemperatureLevel::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, selectedTemperatureLevel)); break; case Attributes::SupportedTemperatureLevels::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, supportedTemperatureLevels)); @@ -11576,49 +12337,7 @@ namespace Events {} // namespace Events } // namespace TemperatureControl namespace RefrigeratorAlarm { -namespace Commands { -namespace Reset { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAlarms), alarms)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMask), mask)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(reader.EnterContainer(outer)); - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - if (!TLV::IsContextTag(reader.GetTag())) - { - continue; - } - switch (TLV::TagNumFromTag(reader.GetTag())) - { - case to_underlying(Fields::kAlarms): - ReturnErrorOnFailure(DataModel::Decode(reader, alarms)); - break; - case to_underlying(Fields::kMask): - ReturnErrorOnFailure(DataModel::Decode(reader, mask)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; -} -} // namespace Reset. -} // namespace Commands +namespace Commands {} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) @@ -11628,9 +12347,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::Mask::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, mask)); break; - case Attributes::Latch::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, latch)); - break; case Attributes::State::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, state)); break; @@ -11713,6 +12429,176 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace Events } // namespace RefrigeratorAlarm +namespace DishwasherModeSelect { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace ChangeToMode { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToMode. +namespace ChangeToModeWithStatus { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kNewMode): + ReturnErrorOnFailure(DataModel::Decode(reader, newMode)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToModeWithStatus. +namespace ChangeToModeResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusText), statusText)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kStatus): + ReturnErrorOnFailure(DataModel::Decode(reader, status)); + break; + case to_underlying(Fields::kStatusText): + ReturnErrorOnFailure(DataModel::Decode(reader, statusText)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ChangeToModeResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Description::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, description)); + break; + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, supportedModes)); + break; + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, currentMode)); + break; + case Attributes::StartUpMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, startUpMode)); + break; + case Attributes::OnMode::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, onMode)); + break; + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); + break; + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, acceptedCommandList)); + break; + case Attributes::EventList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, eventList)); + break; + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, attributeList)); + break; + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, featureMap)); + break; + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterRevision)); + break; + default: + break; + } + + return CHIP_NO_ERROR; +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace DishwasherModeSelect namespace AirQuality { namespace Commands {} // namespace Commands @@ -27138,6 +28024,34 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::LaundryWasherModeSelect::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::RvcRunModeSelect::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::RvcCleanModeSelect::Id: { + switch (aCommand) + { + default: + return false; + } + } case Clusters::TemperatureControl::Id: { switch (aCommand) { @@ -27145,7 +28059,7 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } - case Clusters::RefrigeratorAlarm::Id: { + case Clusters::DishwasherModeSelect::Id: { switch (aCommand) { default: diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index dd413ae7bb3f1d..3dd2881b9049c1 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -43,6 +43,64 @@ namespace Clusters { namespace detail { // Structs shared across multiple clusters. namespace Structs { +namespace ModeTagStruct { +enum class Fields : uint8_t +{ + kMfgCode = 0, + kValue = 1, + kTagName = 2, +}; + +struct Type +{ +public: + Optional mfgCode; + uint16_t value = static_cast(0); + Optional tagName; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +using DecodableType = Type; + +} // namespace ModeTagStruct +namespace ModeOptionStruct { +enum class Fields : uint8_t +{ + kLabel = 0, + kMode = 1, + kModeTags = 2, +}; + +struct Type +{ +public: + chip::CharSpan label; + uint8_t mode = static_cast(0); + DataModel::List modeTags; + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + chip::CharSpan label; + uint8_t mode = static_cast(0); + DataModel::DecodableList modeTags; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; +}; + +} // namespace ModeOptionStruct namespace ApplicationStruct { enum class Fields : uint8_t { @@ -13019,7 +13077,6 @@ struct DecodableType namespace KeySetReadAllIndices { enum class Fields : uint8_t { - kGroupKeySetIDs = 0, }; struct Type @@ -13029,8 +13086,6 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndices::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - DataModel::List groupKeySetIDs; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; using ResponseType = Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType; @@ -13044,7 +13099,6 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndices::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - DataModel::DecodableList groupKeySetIDs; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace KeySetReadAllIndices @@ -13973,89 +14027,111 @@ struct TypeInfo } // namespace IcdManagement namespace ModeSelect { namespace Structs { -namespace SemanticTagStruct { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode + +namespace ChangeToModeWithStatus { +struct Type; +struct DecodableType; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse + +} // namespace Commands + +namespace Commands { +namespace ChangeToMode { enum class Fields : uint8_t { - kMfgCode = 0, - kValue = 1, + kNewMode = 0, }; struct Type { public: - chip::VendorId mfgCode = static_cast(0); - uint16_t value = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - static constexpr bool kIsFabricScoped = false; + uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -using DecodableType = Type; +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } -} // namespace SemanticTagStruct -namespace ModeOptionStruct { + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToMode +namespace ChangeToModeWithStatus { enum class Fields : uint8_t { - kLabel = 0, - kMode = 1, - kSemanticTags = 2, + kNewMode = 0, }; struct Type { public: - chip::CharSpan label; - uint8_t mode = static_cast(0); - DataModel::List semanticTags; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - static constexpr bool kIsFabricScoped = false; + uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = Clusters::ModeSelect::Commands::ChangeToModeResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - chip::CharSpan label; - uint8_t mode = static_cast(0); - DataModel::DecodableList semanticTags; + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; }; - -} // namespace ModeOptionStruct -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace ChangeToMode { -struct Type; -struct DecodableType; -} // namespace ChangeToMode - -} // namespace Commands - -namespace Commands { -namespace ChangeToMode { +}; // namespace ChangeToModeWithStatus +namespace ChangeToModeResponse { enum class Fields : uint8_t { - kNewMode = 0, + kStatus = 0, + kStatusText = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - uint8_t newMode = static_cast(0); + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -14067,13 +14143,14 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - uint8_t newMode = static_cast(0); + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeToMode +}; // namespace ChangeToModeResponse } // namespace Commands namespace Attributes { @@ -14088,7 +14165,7 @@ struct TypeInfo static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } + static constexpr size_t MaxLength() { return 64; } }; } // namespace Description namespace StandardNamespace { @@ -14214,60 +14291,113 @@ struct TypeInfo }; } // namespace Attributes } // namespace ModeSelect -namespace TemperatureControl { +namespace LaundryWasherModeSelect { namespace Structs { -namespace TemperatureLevelStruct { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode + +namespace ChangeToModeWithStatus { +struct Type; +struct DecodableType; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse + +} // namespace Commands + +namespace Commands { +namespace ChangeToMode { enum class Fields : uint8_t { - kLabel = 0, - kTemperatureLevel = 1, + kNewMode = 0, }; struct Type { public: - chip::CharSpan label; - uint8_t temperatureLevel = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } - static constexpr bool kIsFabricScoped = false; + uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -using DecodableType = Type; +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } -} // namespace TemperatureLevelStruct -} // namespace Structs + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToMode +namespace ChangeToModeWithStatus { +enum class Fields : uint8_t +{ + kNewMode = 0, +}; -namespace Commands { -// Forward-declarations so we can reference these later. +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } -namespace SetTemperature { -struct Type; -struct DecodableType; -} // namespace SetTemperature + uint8_t newMode = static_cast(0); -} // namespace Commands + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; -namespace Commands { -namespace SetTemperature { + using ResponseType = Clusters::LaundryWasherModeSelect::Commands::ChangeToModeResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } + + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToModeWithStatus +namespace ChangeToModeResponse { enum class Fields : uint8_t { - kTargetTemperature = 0, - kTargetTemperatureLevel = 1, + kStatus = 0, + kStatusText = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetTemperature::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } - Optional targetTemperature; - Optional targetTemperatureLevel; + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -14279,126 +14409,115 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetTemperature::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } - Optional targetTemperature; - Optional targetTemperatureLevel; + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetTemperature +}; // namespace ChangeToModeResponse } // namespace Commands namespace Attributes { -namespace TemperatureSetpoint { +namespace Description { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpoint::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } }; -} // namespace TemperatureSetpoint -namespace MinTemperature { +} // namespace Description +namespace SupportedModes { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::LaundryWasherModeSelect::Structs::ModeOptionStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinTemperature -namespace MaxTemperature { +} // namespace SupportedModes +namespace CurrentMode { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxTemperature::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MaxTemperature -namespace Step { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Step::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Step -namespace CurrentTemperatureLevelIndex { +} // namespace CurrentMode +namespace StartUpMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentTemperatureLevelIndex::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentTemperatureLevelIndex -namespace SupportedTemperatureLevels { +} // namespace StartUpMode +namespace OnMode { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType>; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedTemperatureLevels::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedTemperatureLevels +} // namespace OnMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } }; } // namespace ClusterRevision @@ -14406,16 +14525,15 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherModeSelect::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::TemperatureSetpoint::TypeInfo::DecodableType temperatureSetpoint = static_cast(0); - Attributes::MinTemperature::TypeInfo::DecodableType minTemperature = static_cast(0); - Attributes::MaxTemperature::TypeInfo::DecodableType maxTemperature = static_cast(0); - Attributes::Step::TypeInfo::DecodableType step = static_cast(0); - Attributes::CurrentTemperatureLevelIndex::TypeInfo::DecodableType currentTemperatureLevelIndex = static_cast(0); - Attributes::SupportedTemperatureLevels::TypeInfo::DecodableType supportedTemperatureLevels; + Attributes::Description::TypeInfo::DecodableType description; + Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; + Attributes::OnMode::TypeInfo::DecodableType onMode; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -14425,36 +14543,48 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace TemperatureControl -namespace RefrigeratorAlarm { +} // namespace LaundryWasherModeSelect +namespace RefrigeratorAndTemperatureControlledCabinetModeSelect { +namespace Structs { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace Reset { +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode + +namespace ChangeToModeWithStatus { +struct Type; +struct DecodableType; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { struct Type; struct DecodableType; -} // namespace Reset +} // namespace ChangeToModeResponse } // namespace Commands namespace Commands { -namespace Reset { +namespace ChangeToMode { enum class Fields : uint8_t { - kAlarms = 0, - kMask = 1, + kNewMode = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Reset::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } - chip::BitMask alarms = static_cast>(0); - Optional> mask; + uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -14466,88 +14596,183 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Reset::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } + + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToMode +namespace ChangeToModeWithStatus { +enum class Fields : uint8_t +{ + kNewMode = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } + + uint8_t newMode = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = + Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Commands::ChangeToModeResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } + + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToModeWithStatus +namespace ChangeToModeResponse { +enum class Fields : uint8_t +{ + kStatus = 0, + kStatusText = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } + + uint8_t status = static_cast(0); + Optional statusText; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; - chip::BitMask alarms = static_cast>(0); - Optional> mask; +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } + + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Reset +}; // namespace ChangeToModeResponse } // namespace Commands namespace Attributes { -namespace Mask { +namespace Description { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Mask::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } }; -} // namespace Mask -namespace Latch { +} // namespace Description +namespace SupportedModes { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::app::DataModel::List< + const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Structs::ModeOptionStruct::Type>; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Structs::ModeOptionStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Structs::ModeOptionStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Latch::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Latch -namespace State { +} // namespace SupportedModes +namespace CurrentMode { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::State::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace State +} // namespace CurrentMode +namespace StartUpMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpMode +namespace OnMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OnMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } }; } // namespace ClusterRevision @@ -14555,16 +14780,15 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Mask::TypeInfo::DecodableType mask = - static_cast>(0); - Attributes::Latch::TypeInfo::DecodableType latch = - static_cast>(0); - Attributes::State::TypeInfo::DecodableType state = - static_cast>(0); + Attributes::Description::TypeInfo::DecodableType description; + Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; + Attributes::OnMode::TypeInfo::DecodableType onMode; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -14574,51 +14798,1193 @@ struct TypeInfo }; }; } // namespace Attributes -namespace Events { -namespace Notify { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // namespace RefrigeratorAndTemperatureControlledCabinetModeSelect +namespace WasherControls { -enum class Fields : uint8_t -{ - kActive = 0, - kInactive = 1, - kState = 2, - kMask = 3, -}; +namespace Attributes { -struct Type +namespace SpinSpeeds { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Notify::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } - static constexpr bool kIsFabricScoped = false; - - chip::BitMask active = static_cast>(0); - chip::BitMask inactive = static_cast>(0); - chip::BitMask state = static_cast>(0); - chip::BitMask mask = static_cast>(0); + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeeds::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace SpinSpeeds +namespace SpinSpeedCurrent { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Notify::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - chip::BitMask active = static_cast>(0); - chip::BitMask inactive = static_cast>(0); - chip::BitMask state = static_cast>(0); - chip::BitMask mask = static_cast>(0); + static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeedCurrent::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SpinSpeedCurrent +namespace NumberOfRinses { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfRinses::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Notify -} // namespace Events -} // namespace RefrigeratorAlarm +} // namespace NumberOfRinses +namespace MaxRinses { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxRinses::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxRinses +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::SpinSpeeds::TypeInfo::DecodableType spinSpeeds; + Attributes::SpinSpeedCurrent::TypeInfo::DecodableType spinSpeedCurrent; + Attributes::NumberOfRinses::TypeInfo::DecodableType numberOfRinses; + Attributes::MaxRinses::TypeInfo::DecodableType maxRinses = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace WasherControls +namespace RvcRunModeSelect { +namespace Structs { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode + +namespace ChangeToModeWithStatus { +struct Type; +struct DecodableType; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse + +} // namespace Commands + +namespace Commands { +namespace ChangeToMode { +enum class Fields : uint8_t +{ + kNewMode = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + + uint8_t newMode = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToMode +namespace ChangeToModeWithStatus { +enum class Fields : uint8_t +{ + kNewMode = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + + uint8_t newMode = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = Clusters::RvcRunModeSelect::Commands::ChangeToModeResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToModeWithStatus +namespace ChangeToModeResponse { +enum class Fields : uint8_t +{ + kStatus = 0, + kStatusText = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + + uint8_t status = static_cast(0); + Optional statusText; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + + uint8_t status = static_cast(0); + Optional statusText; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToModeResponse +} // namespace Commands + +namespace Attributes { + +namespace Description { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } +}; +} // namespace Description +namespace SupportedModes { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::RvcRunModeSelect::Structs::ModeOptionStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedModes +namespace CurrentMode { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentMode +namespace StartUpMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpMode +namespace OnMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OnMode +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunModeSelect::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::Description::TypeInfo::DecodableType description; + Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; + Attributes::OnMode::TypeInfo::DecodableType onMode; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace RvcRunModeSelect +namespace RvcCleanModeSelect { +namespace Structs { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode + +namespace ChangeToModeWithStatus { +struct Type; +struct DecodableType; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse + +} // namespace Commands + +namespace Commands { +namespace ChangeToMode { +enum class Fields : uint8_t +{ + kNewMode = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + + uint8_t newMode = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToMode +namespace ChangeToModeWithStatus { +enum class Fields : uint8_t +{ + kNewMode = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + + uint8_t newMode = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = Clusters::RvcCleanModeSelect::Commands::ChangeToModeResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToModeWithStatus +namespace ChangeToModeResponse { +enum class Fields : uint8_t +{ + kStatus = 0, + kStatusText = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + + uint8_t status = static_cast(0); + Optional statusText; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + + uint8_t status = static_cast(0); + Optional statusText; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToModeResponse +} // namespace Commands + +namespace Attributes { + +namespace Description { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } +}; +} // namespace Description +namespace SupportedModes { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::RvcCleanModeSelect::Structs::ModeOptionStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedModes +namespace CurrentMode { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentMode +namespace StartUpMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpMode +namespace OnMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OnMode +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanModeSelect::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::Description::TypeInfo::DecodableType description; + Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; + Attributes::OnMode::TypeInfo::DecodableType onMode; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace RvcCleanModeSelect +namespace TemperatureControl { + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace SetTemperature { +struct Type; +struct DecodableType; +} // namespace SetTemperature + +} // namespace Commands + +namespace Commands { +namespace SetTemperature { +enum class Fields : uint8_t +{ + kTargetTemperature = 0, + kTargetTemperatureLevel = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + + Optional targetTemperature; + Optional targetTemperatureLevel; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SetTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + + Optional targetTemperature; + Optional targetTemperatureLevel; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetTemperature +} // namespace Commands + +namespace Attributes { + +namespace TemperatureSetpoint { +struct TypeInfo +{ + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpoint::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TemperatureSetpoint +namespace MinTemperature { +struct TypeInfo +{ + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinTemperature::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinTemperature +namespace MaxTemperature { +struct TypeInfo +{ + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxTemperature::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxTemperature +namespace Step { +struct TypeInfo +{ + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Step::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Step +namespace SelectedTemperatureLevel { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SelectedTemperatureLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SelectedTemperatureLevel +namespace SupportedTemperatureLevels { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedTemperatureLevels::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedTemperatureLevels +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::TemperatureSetpoint::TypeInfo::DecodableType temperatureSetpoint = static_cast(0); + Attributes::MinTemperature::TypeInfo::DecodableType minTemperature = static_cast(0); + Attributes::MaxTemperature::TypeInfo::DecodableType maxTemperature = static_cast(0); + Attributes::Step::TypeInfo::DecodableType step = static_cast(0); + Attributes::SelectedTemperatureLevel::TypeInfo::DecodableType selectedTemperatureLevel = static_cast(0); + Attributes::SupportedTemperatureLevels::TypeInfo::DecodableType supportedTemperatureLevels; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace TemperatureControl +namespace RefrigeratorAlarm { + +namespace Attributes { + +namespace Mask { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Mask::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Mask +namespace State { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::State::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace State +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::Mask::TypeInfo::DecodableType mask = + static_cast>(0); + Attributes::State::TypeInfo::DecodableType state = + static_cast>(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +namespace Events { +namespace Notify { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kActive = 0, + kInactive = 1, + kState = 2, + kMask = 3, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Notify::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr bool kIsFabricScoped = false; + + chip::BitMask active = static_cast>(0); + chip::BitMask inactive = static_cast>(0); + chip::BitMask state = static_cast>(0); + chip::BitMask mask = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Notify::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + + chip::BitMask active = static_cast>(0); + chip::BitMask inactive = static_cast>(0); + chip::BitMask state = static_cast>(0); + chip::BitMask mask = static_cast>(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace Notify +} // namespace Events +} // namespace RefrigeratorAlarm +namespace DishwasherModeSelect { +namespace Structs { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode + +namespace ChangeToModeWithStatus { +struct Type; +struct DecodableType; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse + +} // namespace Commands + +namespace Commands { +namespace ChangeToMode { +enum class Fields : uint8_t +{ + kNewMode = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + + uint8_t newMode = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToMode +namespace ChangeToModeWithStatus { +enum class Fields : uint8_t +{ + kNewMode = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + + uint8_t newMode = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = Clusters::DishwasherModeSelect::Commands::ChangeToModeResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeWithStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToModeWithStatus +namespace ChangeToModeResponse { +enum class Fields : uint8_t +{ + kStatus = 0, + kStatusText = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + + uint8_t status = static_cast(0); + Optional statusText; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + + uint8_t status = static_cast(0); + Optional statusText; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToModeResponse +} // namespace Commands + +namespace Attributes { + +namespace Description { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } +}; +} // namespace Description +namespace SupportedModes { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::DishwasherModeSelect::Structs::ModeOptionStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedModes +namespace CurrentMode { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentMode +namespace StartUpMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpMode +namespace OnMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OnMode +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherModeSelect::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::Description::TypeInfo::DecodableType description; + Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; + Attributes::OnMode::TypeInfo::DecodableType onMode; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace DishwasherModeSelect namespace AirQuality { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 98137f41b0da0e..9df5738cf6be5c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -2467,6 +2467,252 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace ModeSelect +namespace LaundryWasherModeSelect { +namespace Attributes { + +namespace Description { +static constexpr AttributeId Id = 0x00000000; +} // namespace Description + +namespace SupportedModes { +static constexpr AttributeId Id = 0x00000002; +} // namespace SupportedModes + +namespace CurrentMode { +static constexpr AttributeId Id = 0x00000003; +} // namespace CurrentMode + +namespace StartUpMode { +static constexpr AttributeId Id = 0x00000004; +} // namespace StartUpMode + +namespace OnMode { +static constexpr AttributeId Id = 0x00000005; +} // namespace OnMode + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace LaundryWasherModeSelect + +namespace RefrigeratorAndTemperatureControlledCabinetModeSelect { +namespace Attributes { + +namespace Description { +static constexpr AttributeId Id = 0x00000000; +} // namespace Description + +namespace SupportedModes { +static constexpr AttributeId Id = 0x00000002; +} // namespace SupportedModes + +namespace CurrentMode { +static constexpr AttributeId Id = 0x00000003; +} // namespace CurrentMode + +namespace StartUpMode { +static constexpr AttributeId Id = 0x00000004; +} // namespace StartUpMode + +namespace OnMode { +static constexpr AttributeId Id = 0x00000005; +} // namespace OnMode + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RefrigeratorAndTemperatureControlledCabinetModeSelect + +namespace WasherControls { +namespace Attributes { + +namespace SpinSpeeds { +static constexpr AttributeId Id = 0x00000000; +} // namespace SpinSpeeds + +namespace SpinSpeedCurrent { +static constexpr AttributeId Id = 0x00000001; +} // namespace SpinSpeedCurrent + +namespace NumberOfRinses { +static constexpr AttributeId Id = 0x00000002; +} // namespace NumberOfRinses + +namespace MaxRinses { +static constexpr AttributeId Id = 0x00000003; +} // namespace MaxRinses + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace WasherControls + +namespace RvcRunModeSelect { +namespace Attributes { + +namespace Description { +static constexpr AttributeId Id = 0x00000000; +} // namespace Description + +namespace SupportedModes { +static constexpr AttributeId Id = 0x00000002; +} // namespace SupportedModes + +namespace CurrentMode { +static constexpr AttributeId Id = 0x00000003; +} // namespace CurrentMode + +namespace StartUpMode { +static constexpr AttributeId Id = 0x00000004; +} // namespace StartUpMode + +namespace OnMode { +static constexpr AttributeId Id = 0x00000005; +} // namespace OnMode + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RvcRunModeSelect + +namespace RvcCleanModeSelect { +namespace Attributes { + +namespace Description { +static constexpr AttributeId Id = 0x00000000; +} // namespace Description + +namespace SupportedModes { +static constexpr AttributeId Id = 0x00000002; +} // namespace SupportedModes + +namespace CurrentMode { +static constexpr AttributeId Id = 0x00000003; +} // namespace CurrentMode + +namespace StartUpMode { +static constexpr AttributeId Id = 0x00000004; +} // namespace StartUpMode + +namespace OnMode { +static constexpr AttributeId Id = 0x00000005; +} // namespace OnMode + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RvcCleanModeSelect + namespace TemperatureControl { namespace Attributes { @@ -2486,9 +2732,9 @@ namespace Step { static constexpr AttributeId Id = 0x00000003; } // namespace Step -namespace CurrentTemperatureLevelIndex { +namespace SelectedTemperatureLevel { static constexpr AttributeId Id = 0x00000004; -} // namespace CurrentTemperatureLevelIndex +} // namespace SelectedTemperatureLevel namespace SupportedTemperatureLevels { static constexpr AttributeId Id = 0x00000005; @@ -2528,10 +2774,6 @@ namespace Mask { static constexpr AttributeId Id = 0x00000000; } // namespace Mask -namespace Latch { -static constexpr AttributeId Id = 0x00000001; -} // namespace Latch - namespace State { static constexpr AttributeId Id = 0x00000002; } // namespace State @@ -2563,6 +2805,56 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace RefrigeratorAlarm +namespace DishwasherModeSelect { +namespace Attributes { + +namespace Description { +static constexpr AttributeId Id = 0x00000000; +} // namespace Description + +namespace SupportedModes { +static constexpr AttributeId Id = 0x00000002; +} // namespace SupportedModes + +namespace CurrentMode { +static constexpr AttributeId Id = 0x00000003; +} // namespace CurrentMode + +namespace StartUpMode { +static constexpr AttributeId Id = 0x00000004; +} // namespace StartUpMode + +namespace OnMode { +static constexpr AttributeId Id = 0x00000005; +} // namespace OnMode + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DishwasherModeSelect + namespace AirQuality { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index fb421964765e65..afbdd5fdf33410 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -151,12 +151,30 @@ static constexpr ClusterId Id = 0x00000046; namespace ModeSelect { static constexpr ClusterId Id = 0x00000050; } // namespace ModeSelect +namespace LaundryWasherModeSelect { +static constexpr ClusterId Id = 0x00000051; +} // namespace LaundryWasherModeSelect +namespace RefrigeratorAndTemperatureControlledCabinetModeSelect { +static constexpr ClusterId Id = 0x00000052; +} // namespace RefrigeratorAndTemperatureControlledCabinetModeSelect +namespace WasherControls { +static constexpr ClusterId Id = 0x00000053; +} // namespace WasherControls +namespace RvcRunModeSelect { +static constexpr ClusterId Id = 0x00000054; +} // namespace RvcRunModeSelect +namespace RvcCleanModeSelect { +static constexpr ClusterId Id = 0x00000055; +} // namespace RvcCleanModeSelect namespace TemperatureControl { static constexpr ClusterId Id = 0x00000056; } // namespace TemperatureControl namespace RefrigeratorAlarm { static constexpr ClusterId Id = 0x00000057; } // namespace RefrigeratorAlarm +namespace DishwasherModeSelect { +static constexpr ClusterId Id = 0x00000059; +} // namespace DishwasherModeSelect namespace AirQuality { static constexpr ClusterId Id = 0x0000005B; } // namespace AirQuality diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index f1649335f7d8ed..54ed91151d52cd 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -638,9 +638,89 @@ namespace ChangeToMode { static constexpr CommandId Id = 0x00000000; } // namespace ChangeToMode +namespace ChangeToModeWithStatus { +static constexpr CommandId Id = 0x00000001; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { +static constexpr CommandId Id = 0x00000002; +} // namespace ChangeToModeResponse + } // namespace Commands } // namespace ModeSelect +namespace LaundryWasherModeSelect { +namespace Commands { + +namespace ChangeToMode { +static constexpr CommandId Id = 0x00000000; +} // namespace ChangeToMode + +namespace ChangeToModeWithStatus { +static constexpr CommandId Id = 0x00000001; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { +static constexpr CommandId Id = 0x00000002; +} // namespace ChangeToModeResponse + +} // namespace Commands +} // namespace LaundryWasherModeSelect + +namespace RefrigeratorAndTemperatureControlledCabinetModeSelect { +namespace Commands { + +namespace ChangeToMode { +static constexpr CommandId Id = 0x00000000; +} // namespace ChangeToMode + +namespace ChangeToModeWithStatus { +static constexpr CommandId Id = 0x00000001; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { +static constexpr CommandId Id = 0x00000002; +} // namespace ChangeToModeResponse + +} // namespace Commands +} // namespace RefrigeratorAndTemperatureControlledCabinetModeSelect + +namespace RvcRunModeSelect { +namespace Commands { + +namespace ChangeToMode { +static constexpr CommandId Id = 0x00000000; +} // namespace ChangeToMode + +namespace ChangeToModeWithStatus { +static constexpr CommandId Id = 0x00000001; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { +static constexpr CommandId Id = 0x00000002; +} // namespace ChangeToModeResponse + +} // namespace Commands +} // namespace RvcRunModeSelect + +namespace RvcCleanModeSelect { +namespace Commands { + +namespace ChangeToMode { +static constexpr CommandId Id = 0x00000000; +} // namespace ChangeToMode + +namespace ChangeToModeWithStatus { +static constexpr CommandId Id = 0x00000001; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { +static constexpr CommandId Id = 0x00000002; +} // namespace ChangeToModeResponse + +} // namespace Commands +} // namespace RvcCleanModeSelect + namespace TemperatureControl { namespace Commands { @@ -651,15 +731,23 @@ static constexpr CommandId Id = 0x00000000; } // namespace Commands } // namespace TemperatureControl -namespace RefrigeratorAlarm { +namespace DishwasherModeSelect { namespace Commands { -namespace Reset { +namespace ChangeToMode { static constexpr CommandId Id = 0x00000000; -} // namespace Reset +} // namespace ChangeToMode + +namespace ChangeToModeWithStatus { +static constexpr CommandId Id = 0x00000001; +} // namespace ChangeToModeWithStatus + +namespace ChangeToModeResponse { +static constexpr CommandId Id = 0x00000002; +} // namespace ChangeToModeResponse } // namespace Commands -} // namespace RefrigeratorAlarm +} // namespace DishwasherModeSelect namespace SmokeCoAlarm { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index 4b77fce6bf9afd..a254d99be4a077 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -292,6 +292,40 @@ #define CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER #endif +#if defined(ZCL_USING_LAUNDRY_WASHER_MODE_SELECT_CLUSTER_SERVER) || defined(ZCL_USING_LAUNDRY_WASHER_MODE_SELECT_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_LAUNDRY_WASHER_MODE_SELECT_CLUSTER \ + { chip::app::Clusters::LaundryWasherModeSelect::Id, "Laundry Washer Mode Select" }, +#else +#define CHIP_PRINTCLUSTER_LAUNDRY_WASHER_MODE_SELECT_CLUSTER +#endif + +#if defined(ZCL_USING_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER_SERVER) || \ + defined(ZCL_USING_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER \ + { chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Id, \ + "Refrigerator And Temperature Controlled Cabinet Mode Select" }, +#else +#define CHIP_PRINTCLUSTER_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER +#endif + +#if defined(ZCL_USING_WASHER_CONTROLS_CLUSTER_SERVER) || defined(ZCL_USING_WASHER_CONTROLS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_WASHER_CONTROLS_CLUSTER { chip::app::Clusters::WasherControls::Id, "Washer Controls" }, +#else +#define CHIP_PRINTCLUSTER_WASHER_CONTROLS_CLUSTER +#endif + +#if defined(ZCL_USING_RVC_RUN_MODE_SELECT_CLUSTER_SERVER) || defined(ZCL_USING_RVC_RUN_MODE_SELECT_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_RVC_RUN_MODE_SELECT_CLUSTER { chip::app::Clusters::RvcRunModeSelect::Id, "RVC Run Mode Select" }, +#else +#define CHIP_PRINTCLUSTER_RVC_RUN_MODE_SELECT_CLUSTER +#endif + +#if defined(ZCL_USING_RVC_CLEAN_MODE_SELECT_CLUSTER_SERVER) || defined(ZCL_USING_RVC_CLEAN_MODE_SELECT_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_RVC_CLEAN_MODE_SELECT_CLUSTER { chip::app::Clusters::RvcCleanModeSelect::Id, "RVC Clean Mode Select" }, +#else +#define CHIP_PRINTCLUSTER_RVC_CLEAN_MODE_SELECT_CLUSTER +#endif + #if defined(ZCL_USING_TEMPERATURE_CONTROL_CLUSTER_SERVER) || defined(ZCL_USING_TEMPERATURE_CONTROL_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_TEMPERATURE_CONTROL_CLUSTER { chip::app::Clusters::TemperatureControl::Id, "Temperature Control" }, #else @@ -304,6 +338,13 @@ #define CHIP_PRINTCLUSTER_REFRIGERATOR_ALARM #endif +#if defined(ZCL_USING_DISHWASHER_MODE_SELECT_CLUSTER_SERVER) || defined(ZCL_USING_DISHWASHER_MODE_SELECT_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_DISHWASHER_MODE_SELECT_CLUSTER \ + { chip::app::Clusters::DishwasherModeSelect::Id, "Dishwasher Mode Select" }, +#else +#define CHIP_PRINTCLUSTER_DISHWASHER_MODE_SELECT_CLUSTER +#endif + #if defined(ZCL_USING_AIR_QUALITY_CLUSTER_SERVER) || defined(ZCL_USING_AIR_QUALITY_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_AIR_QUALITY_CLUSTER { chip::app::Clusters::AirQuality::Id, "Air Quality" }, #else @@ -926,8 +967,14 @@ CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER \ CHIP_PRINTCLUSTER_ICD_MANAGEMENT_CLUSTER \ CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER \ + CHIP_PRINTCLUSTER_LAUNDRY_WASHER_MODE_SELECT_CLUSTER \ + CHIP_PRINTCLUSTER_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SELECT_CLUSTER \ + CHIP_PRINTCLUSTER_WASHER_CONTROLS_CLUSTER \ + CHIP_PRINTCLUSTER_RVC_RUN_MODE_SELECT_CLUSTER \ + CHIP_PRINTCLUSTER_RVC_CLEAN_MODE_SELECT_CLUSTER \ CHIP_PRINTCLUSTER_TEMPERATURE_CONTROL_CLUSTER \ CHIP_PRINTCLUSTER_REFRIGERATOR_ALARM \ + CHIP_PRINTCLUSTER_DISHWASHER_MODE_SELECT_CLUSTER \ CHIP_PRINTCLUSTER_AIR_QUALITY_CLUSTER \ CHIP_PRINTCLUSTER_SMOKE_CO_ALARM_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_STATE_CLUSTER \ @@ -1010,4 +1057,4 @@ CHIP_PRINTCLUSTER_UNIT_TESTING_CLUSTER \ CHIP_PRINTCLUSTER_FAULT_INJECTION_CLUSTER -#define MAX_CLUSTER_NAME_LENGTH 58 +#define MAX_CLUSTER_NAME_LENGTH 59 diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 5390d069693ec9..e286a82888ae37 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -74,8 +74,14 @@ | BooleanState | 0x0045 | | IcdManagement | 0x0046 | | ModeSelect | 0x0050 | +| LaundryWasherModeSelect | 0x0051 | +| RefrigeratorAndTemperatureControlledCabinetModeSelect | 0x0052 | +| WasherControls | 0x0053 | +| RvcRunModeSelect | 0x0054 | +| RvcCleanModeSelect | 0x0055 | | TemperatureControl | 0x0056 | | RefrigeratorAlarm | 0x0057 | +| DishwasherModeSelect | 0x0059 | | AirQuality | 0x005B | | SmokeCoAlarm | 0x005C | | OperationalState | 0x0060 | @@ -3780,9 +3786,8 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { public: GroupKeyManagementKeySetReadAllIndices(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("key-set-read-all-indices", credsIssuerConfig), mComplex_GroupKeySetIDs(&mRequest.groupKeySetIDs) + ClusterCommand("key-set-read-all-indices", credsIssuerConfig) { - AddArgument("GroupKeySetIDs", &mComplex_GroupKeySetIDs); ClusterCommand::AddArguments(); } @@ -3802,7 +3807,6 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand private: chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type mRequest; - TypedComplexArgument> mComplex_GroupKeySetIDs; }; /*----------------------------------------------------------------------------*\ @@ -4030,6 +4034,7 @@ class IcdManagementStayActiveRequest : public ClusterCommand |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | +| * ChangeToModeWithStatus | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | | * Description | 0x0000 | @@ -4078,71 +4083,50 @@ class ModeSelectChangeToMode : public ClusterCommand chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster TemperatureControl | 0x0056 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetTemperature | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureSetpoint | 0x0000 | -| * MinTemperature | 0x0001 | -| * MaxTemperature | 0x0002 | -| * Step | 0x0003 | -| * CurrentTemperatureLevelIndex | 0x0004 | -| * SupportedTemperatureLevels | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command SetTemperature + * Command ChangeToModeWithStatus */ -class TemperatureControlSetTemperature : public ClusterCommand +class ModeSelectChangeToModeWithStatus : public ClusterCommand { public: - TemperatureControlSetTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-temperature", credsIssuerConfig) + ModeSelectChangeToModeWithStatus(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode-with-status", credsIssuerConfig) { - AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); - AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000056, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000050, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000056, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000050, 0x00000001, mRequest); } private: - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; + chip::app::Clusters::ModeSelect::Commands::ChangeToModeWithStatus::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAlarm | 0x0057 | +| Cluster LaundryWasherModeSelect | 0x0051 | |------------------------------------------------------------------------------| | Commands: | | -| * Reset | 0x00 | +| * ChangeToMode | 0x00 | +| * ChangeToModeWithStatus | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * Mask | 0x0000 | -| * Latch | 0x0001 | -| * State | 0x0002 | +| * Description | 0x0000 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4151,143 +4135,83 @@ class TemperatureControlSetTemperature : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ /* - * Command Reset + * Command ChangeToMode */ -class RefrigeratorAlarmReset : public ClusterCommand +class LaundryWasherModeSelectChangeToMode : public ClusterCommand { public: - RefrigeratorAlarmReset(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset", credsIssuerConfig) + LaundryWasherModeSelectChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode", credsIssuerConfig) { - AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); - AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000051) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000057, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000051, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000051) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000057, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000051, 0x00000000, mRequest); } private: - chip::app::Clusters::RefrigeratorAlarm::Commands::Reset::Type mRequest; + chip::app::Clusters::LaundryWasherModeSelect::Commands::ChangeToMode::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster AirQuality | 0x005B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * AirQuality | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster SmokeCoAlarm | 0x005C | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelfTestRequest | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ExpressedState | 0x0000 | -| * SmokeState | 0x0001 | -| * COState | 0x0002 | -| * BatteryAlert | 0x0003 | -| * DeviceMuted | 0x0004 | -| * TestInProgress | 0x0005 | -| * HardwareFaultAlert | 0x0006 | -| * EndOfServiceAlert | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * ContaminationState | 0x000A | -| * SensitivityLevel | 0x000B | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SmokeAlarm | 0x0000 | -| * COAlarm | 0x0001 | -| * LowBattery | 0x0002 | -| * HardwareFault | 0x0003 | -| * EndOfService | 0x0004 | -| * SelfTestComplete | 0x0005 | -| * AlarmMuted | 0x0006 | -| * MuteEnded | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * AllClear | 0x000A | -\*----------------------------------------------------------------------------*/ - /* - * Command SelfTestRequest + * Command ChangeToModeWithStatus */ -class SmokeCoAlarmSelfTestRequest : public ClusterCommand +class LaundryWasherModeSelectChangeToModeWithStatus : public ClusterCommand { public: - SmokeCoAlarmSelfTestRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("self-test-request", credsIssuerConfig) + LaundryWasherModeSelectChangeToModeWithStatus(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode-with-status", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000051) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000005C, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000051, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000051) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000005C, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000051, 0x00000001, mRequest); } private: - chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type mRequest; + chip::app::Clusters::LaundryWasherModeSelect::Commands::ChangeToModeWithStatus::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster OperationalState | 0x0060 | +| Cluster RefrigeratorAndTemperatureControlledCabinetModeSelect | 0x0052 | |------------------------------------------------------------------------------| | Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | +| * ChangeToMode | 0x00 | +| * ChangeToModeWithStatus | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | +| * Description | 0x0000 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4296,137 +4220,187 @@ class SmokeCoAlarmSelfTestRequest : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command Pause + * Command ChangeToMode */ -class OperationalStatePause : public ClusterCommand +class RefrigeratorAndTemperatureControlledCabinetModeSelectChangeToMode : public ClusterCommand { public: - OperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) + RefrigeratorAndTemperatureControlledCabinetModeSelectChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000052) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000052, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000052) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000052, 0x00000000, mRequest); } private: - chip::app::Clusters::OperationalState::Commands::Pause::Type mRequest; + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Commands::ChangeToMode::Type mRequest; }; /* - * Command Stop + * Command ChangeToModeWithStatus */ -class OperationalStateStop : public ClusterCommand +class RefrigeratorAndTemperatureControlledCabinetModeSelectChangeToModeWithStatus : public ClusterCommand { public: - OperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) + RefrigeratorAndTemperatureControlledCabinetModeSelectChangeToModeWithStatus(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode-with-status", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000052) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000052, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000052) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000052, 0x00000001, mRequest); } private: - chip::app::Clusters::OperationalState::Commands::Stop::Type mRequest; + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Commands::ChangeToModeWithStatus::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster WasherControls | 0x0053 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SpinSpeeds | 0x0000 | +| * SpinSpeedCurrent | 0x0001 | +| * NumberOfRinses | 0x0002 | +| * MaxRinses | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster RvcRunModeSelect | 0x0054 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +| * ChangeToModeWithStatus | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Description | 0x0000 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command Start + * Command ChangeToMode */ -class OperationalStateStart : public ClusterCommand +class RvcRunModeSelectChangeToMode : public ClusterCommand { public: - OperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) + RvcRunModeSelectChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000054) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000054, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000054) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000054, 0x00000000, mRequest); } private: - chip::app::Clusters::OperationalState::Commands::Start::Type mRequest; + chip::app::Clusters::RvcRunModeSelect::Commands::ChangeToMode::Type mRequest; }; /* - * Command Resume + * Command ChangeToModeWithStatus */ -class OperationalStateResume : public ClusterCommand +class RvcRunModeSelectChangeToModeWithStatus : public ClusterCommand { public: - OperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", credsIssuerConfig) + RvcRunModeSelectChangeToModeWithStatus(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode-with-status", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000003) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000054) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000003, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000054, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000003) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000054) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000054, 0x00000001, mRequest); } private: - chip::app::Clusters::OperationalState::Commands::Resume::Type mRequest; + chip::app::Clusters::RvcRunModeSelect::Commands::ChangeToModeWithStatus::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster HepaFilterMonitoring | 0x0071 | +| Cluster RvcCleanModeSelect | 0x0055 | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCondition | 0x00 | +| * ChangeToMode | 0x00 | +| * ChangeToModeWithStatus | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | +| * Description | 0x0000 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4438,97 +4412,80 @@ class OperationalStateResume : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command ResetCondition + * Command ChangeToMode */ -class HepaFilterMonitoringResetCondition : public ClusterCommand +class RvcCleanModeSelectChangeToMode : public ClusterCommand { public: - HepaFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-condition", credsIssuerConfig) + RvcCleanModeSelectChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000055) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000071, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000055, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000055) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000071, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000055, 0x00000000, mRequest); } private: - chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::Type mRequest; + chip::app::Clusters::RvcCleanModeSelect::Commands::ChangeToMode::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster ActivatedCarbonFilterMonitoring | 0x0072 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCondition | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command ResetCondition + * Command ChangeToModeWithStatus */ -class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand +class RvcCleanModeSelectChangeToModeWithStatus : public ClusterCommand { public: - ActivatedCarbonFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-condition", credsIssuerConfig) + RvcCleanModeSelectChangeToModeWithStatus(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode-with-status", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000055) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000072, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000055, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000055) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000072, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000055, 0x00000001, mRequest); } private: - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type mRequest; + chip::app::Clusters::RvcCleanModeSelect::Commands::ChangeToModeWithStatus::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster CeramicFilterMonitoring | 0x0073 | +| Cluster TemperatureControl | 0x0056 | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCondition | 0x00 | +| * SetTemperature | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | +| * TemperatureSetpoint | 0x0000 | +| * MinTemperature | 0x0001 | +| * MaxTemperature | 0x0002 | +| * Step | 0x0003 | +| * SelectedTemperatureLevel | 0x0004 | +| * SupportedTemperatureLevels | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4540,46 +4497,45 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command ResetCondition + * Command SetTemperature */ -class CeramicFilterMonitoringResetCondition : public ClusterCommand +class TemperatureControlSetTemperature : public ClusterCommand { public: - CeramicFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-condition", credsIssuerConfig) + TemperatureControlSetTemperature(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-temperature", credsIssuerConfig) { + AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); + AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000073) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000056) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000073, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000056, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000073) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000056) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000073, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000056, 0x00000000, mRequest); } private: - chip::app::Clusters::CeramicFilterMonitoring::Commands::ResetCondition::Type mRequest; + chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster ElectrostaticFilterMonitoring | 0x0074 | +| Cluster RefrigeratorAlarm | 0x0057 | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCondition | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | +| * Mask | 0x0000 | +| * State | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4588,49 +4544,22 @@ class CeramicFilterMonitoringResetCondition : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ -/* - * Command ResetCondition - */ -class ElectrostaticFilterMonitoringResetCondition : public ClusterCommand -{ -public: - ElectrostaticFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-condition", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000074) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000074, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000074) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000074, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::ElectrostaticFilterMonitoring::Commands::ResetCondition::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ -| Cluster UvFilterMonitoring | 0x0075 | +| Cluster DishwasherModeSelect | 0x0059 | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCondition | 0x00 | +| * ChangeToMode | 0x00 | +| * ChangeToModeWithStatus | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | +| * Description | 0x0000 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4642,97 +4571,74 @@ class ElectrostaticFilterMonitoringResetCondition : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command ResetCondition + * Command ChangeToMode */ -class UvFilterMonitoringResetCondition : public ClusterCommand +class DishwasherModeSelectChangeToMode : public ClusterCommand { public: - UvFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-condition", credsIssuerConfig) + DishwasherModeSelectChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000075) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000059) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000075, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000059, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000075) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000059) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000075, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000059, 0x00000000, mRequest); } private: - chip::app::Clusters::UvFilterMonitoring::Commands::ResetCondition::Type mRequest; + chip::app::Clusters::DishwasherModeSelect::Commands::ChangeToMode::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster IonizingFilterMonitoring | 0x0076 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCondition | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command ResetCondition + * Command ChangeToModeWithStatus */ -class IonizingFilterMonitoringResetCondition : public ClusterCommand +class DishwasherModeSelectChangeToModeWithStatus : public ClusterCommand { public: - IonizingFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-condition", credsIssuerConfig) + DishwasherModeSelectChangeToModeWithStatus(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode-with-status", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000076) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000059) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000076, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000059, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000076) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000059) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000076, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000059, 0x00000001, mRequest); } private: - chip::app::Clusters::IonizingFilterMonitoring::Commands::ResetCondition::Type mRequest; + chip::app::Clusters::DishwasherModeSelect::Commands::ChangeToModeWithStatus::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster ZeoliteFilterMonitoring | 0x0077 | +| Cluster AirQuality | 0x005B | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCondition | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | +| * AirQuality | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4743,47 +4649,25 @@ class IonizingFilterMonitoringResetCondition : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command ResetCondition - */ -class ZeoliteFilterMonitoringResetCondition : public ClusterCommand -{ -public: - ZeoliteFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-condition", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000077) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000077, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000077) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000077, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::ZeoliteFilterMonitoring::Commands::ResetCondition::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ -| Cluster OzoneFilterMonitoring | 0x0078 | +| Cluster SmokeCoAlarm | 0x005C | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCondition | 0x00 | +| * SelfTestRequest | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | +| * ExpressedState | 0x0000 | +| * SmokeState | 0x0001 | +| * COState | 0x0002 | +| * BatteryAlert | 0x0003 | +| * DeviceMuted | 0x0004 | +| * TestInProgress | 0x0005 | +| * HardwareFaultAlert | 0x0006 | +| * EndOfServiceAlert | 0x0007 | +| * InterconnectSmokeAlarm | 0x0008 | +| * InterconnectCOAlarm | 0x0009 | +| * ContaminationState | 0x000A | +| * SensitivityLevel | 0x000B | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4792,49 +4676,65 @@ class ZeoliteFilterMonitoringResetCondition : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * SmokeAlarm | 0x0000 | +| * COAlarm | 0x0001 | +| * LowBattery | 0x0002 | +| * HardwareFault | 0x0003 | +| * EndOfService | 0x0004 | +| * SelfTestComplete | 0x0005 | +| * AlarmMuted | 0x0006 | +| * MuteEnded | 0x0007 | +| * InterconnectSmokeAlarm | 0x0008 | +| * InterconnectCOAlarm | 0x0009 | +| * AllClear | 0x000A | \*----------------------------------------------------------------------------*/ /* - * Command ResetCondition + * Command SelfTestRequest */ -class OzoneFilterMonitoringResetCondition : public ClusterCommand +class SmokeCoAlarmSelfTestRequest : public ClusterCommand { public: - OzoneFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-condition", credsIssuerConfig) + SmokeCoAlarmSelfTestRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("self-test-request", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000078) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000005C) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000078, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000005C, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000078) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000005C) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000078, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000005C, 0x00000000, mRequest); } private: - chip::app::Clusters::OzoneFilterMonitoring::Commands::ResetCondition::Type mRequest; + chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster WaterTankMonitoring | 0x0079 | +| Cluster OperationalState | 0x0060 | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCondition | 0x00 | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4843,40 +4743,128 @@ class OzoneFilterMonitoringResetCondition : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command ResetCondition + * Command Pause */ -class WaterTankMonitoringResetCondition : public ClusterCommand +class OperationalStatePause : public ClusterCommand { public: - WaterTankMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-condition", credsIssuerConfig) + OperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000079) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000079, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000079) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000079, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000000, mRequest); } private: - chip::app::Clusters::WaterTankMonitoring::Commands::ResetCondition::Type mRequest; + chip::app::Clusters::OperationalState::Commands::Pause::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster FuelTankMonitoring | 0x007A | +/* + * Command Stop + */ +class OperationalStateStop : public ClusterCommand +{ +public: + OperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000001, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000001, mRequest); + } + +private: + chip::app::Clusters::OperationalState::Commands::Stop::Type mRequest; +}; + +/* + * Command Start + */ +class OperationalStateStart : public ClusterCommand +{ +public: + OperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000002, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000002, mRequest); + } + +private: + chip::app::Clusters::OperationalState::Commands::Start::Type mRequest; +}; + +/* + * Command Resume + */ +class OperationalStateResume : public ClusterCommand +{ +public: + OperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000003, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000003, mRequest); + } + +private: + chip::app::Clusters::OperationalState::Commands::Resume::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster HepaFilterMonitoring | 0x0071 | |------------------------------------------------------------------------------| | Commands: | | | * ResetCondition | 0x00 | @@ -4899,10 +4887,10 @@ class WaterTankMonitoringResetCondition : public ClusterCommand /* * Command ResetCondition */ -class FuelTankMonitoringResetCondition : public ClusterCommand +class HepaFilterMonitoringResetCondition : public ClusterCommand { public: - FuelTankMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + HepaFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-condition", credsIssuerConfig) { ClusterCommand::AddArguments(); @@ -4910,24 +4898,24 @@ class FuelTankMonitoringResetCondition : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000007A) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000071) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000007A, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000071, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000007A) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000071) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000007A, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000071, 0x00000000, mRequest); } private: - chip::app::Clusters::FuelTankMonitoring::Commands::ResetCondition::Type mRequest; + chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster InkCartridgeMonitoring | 0x007B | +| Cluster ActivatedCarbonFilterMonitoring | 0x0072 | |------------------------------------------------------------------------------| | Commands: | | | * ResetCondition | 0x00 | @@ -4950,10 +4938,10 @@ class FuelTankMonitoringResetCondition : public ClusterCommand /* * Command ResetCondition */ -class InkCartridgeMonitoringResetCondition : public ClusterCommand +class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand { public: - InkCartridgeMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + ActivatedCarbonFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-condition", credsIssuerConfig) { ClusterCommand::AddArguments(); @@ -4961,24 +4949,24 @@ class InkCartridgeMonitoringResetCondition : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000007B) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000072) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000007B, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000072, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000007B) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000072) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000007B, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000072, 0x00000000, mRequest); } private: - chip::app::Clusters::InkCartridgeMonitoring::Commands::ResetCondition::Type mRequest; + chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster TonerCartridgeMonitoring | 0x007C | +| Cluster CeramicFilterMonitoring | 0x0073 | |------------------------------------------------------------------------------| | Commands: | | | * ResetCondition | 0x00 | @@ -5001,10 +4989,10 @@ class InkCartridgeMonitoringResetCondition : public ClusterCommand /* * Command ResetCondition */ -class TonerCartridgeMonitoringResetCondition : public ClusterCommand +class CeramicFilterMonitoringResetCondition : public ClusterCommand { public: - TonerCartridgeMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + CeramicFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-condition", credsIssuerConfig) { ClusterCommand::AddArguments(); @@ -5012,83 +5000,33 @@ class TonerCartridgeMonitoringResetCondition : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000007C) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000073) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000007C, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000073, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000007C) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000073) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000007C, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000073, 0x00000000, mRequest); } private: - chip::app::Clusters::TonerCartridgeMonitoring::Commands::ResetCondition::Type mRequest; + chip::app::Clusters::CeramicFilterMonitoring::Commands::ResetCondition::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster DoorLock | 0x0101 | +| Cluster ElectrostaticFilterMonitoring | 0x0074 | |------------------------------------------------------------------------------| | Commands: | | -| * LockDoor | 0x00 | -| * UnlockDoor | 0x01 | -| * UnlockWithTimeout | 0x03 | -| * SetWeekDaySchedule | 0x0B | -| * GetWeekDaySchedule | 0x0C | -| * ClearWeekDaySchedule | 0x0D | -| * SetYearDaySchedule | 0x0E | -| * GetYearDaySchedule | 0x0F | -| * ClearYearDaySchedule | 0x10 | -| * SetHolidaySchedule | 0x11 | -| * GetHolidaySchedule | 0x12 | -| * ClearHolidaySchedule | 0x13 | -| * SetUser | 0x1A | -| * GetUser | 0x1B | -| * ClearUser | 0x1D | -| * SetCredential | 0x22 | -| * GetCredentialStatus | 0x24 | -| * ClearCredential | 0x26 | -| * UnboltDoor | 0x27 | +| * ResetCondition | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * LockState | 0x0000 | -| * LockType | 0x0001 | -| * ActuatorEnabled | 0x0002 | -| * DoorState | 0x0003 | -| * DoorOpenEvents | 0x0004 | -| * DoorClosedEvents | 0x0005 | -| * OpenPeriod | 0x0006 | -| * NumberOfTotalUsersSupported | 0x0011 | -| * NumberOfPINUsersSupported | 0x0012 | -| * NumberOfRFIDUsersSupported | 0x0013 | -| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | -| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | -| * NumberOfHolidaySchedulesSupported | 0x0016 | -| * MaxPINCodeLength | 0x0017 | -| * MinPINCodeLength | 0x0018 | -| * MaxRFIDCodeLength | 0x0019 | -| * MinRFIDCodeLength | 0x001A | -| * CredentialRulesSupport | 0x001B | -| * NumberOfCredentialsSupportedPerUser | 0x001C | -| * Language | 0x0021 | -| * LEDSettings | 0x0022 | -| * AutoRelockTime | 0x0023 | -| * SoundVolume | 0x0024 | -| * OperatingMode | 0x0025 | -| * SupportedOperatingModes | 0x0026 | -| * DefaultConfigurationRegister | 0x0027 | -| * EnableLocalProgramming | 0x0028 | -| * EnableOneTouchLocking | 0x0029 | -| * EnableInsideStatusLED | 0x002A | -| * EnablePrivacyModeButton | 0x002B | -| * LocalProgrammingFeatures | 0x002C | -| * WrongCodeEntryLimit | 0x0030 | -| * UserCodeTemporaryDisableTime | 0x0031 | -| * SendPINOverTheAir | 0x0032 | -| * RequirePINforRemoteOperation | 0x0033 | -| * ExpiringUserTimeout | 0x0035 | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5097,1088 +5035,1172 @@ class TonerCartridgeMonitoringResetCondition : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * DoorLockAlarm | 0x0000 | -| * DoorStateChange | 0x0001 | -| * LockOperation | 0x0002 | -| * LockOperationError | 0x0003 | -| * LockUserChange | 0x0004 | \*----------------------------------------------------------------------------*/ /* - * Command LockDoor + * Command ResetCondition */ -class DoorLockLockDoor : public ClusterCommand +class ElectrostaticFilterMonitoringResetCondition : public ClusterCommand { public: - DoorLockLockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("lock-door", credsIssuerConfig) + ElectrostaticFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-condition", credsIssuerConfig) { - AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000074) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000074, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000074) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000074, 0x00000000, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; + chip::app::Clusters::ElectrostaticFilterMonitoring::Commands::ResetCondition::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster UvFilterMonitoring | 0x0075 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCondition | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command UnlockDoor + * Command ResetCondition */ -class DoorLockUnlockDoor : public ClusterCommand +class UvFilterMonitoringResetCondition : public ClusterCommand { public: - DoorLockUnlockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unlock-door", credsIssuerConfig) + UvFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-condition", credsIssuerConfig) { - AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000075) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000075, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000075) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000075, 0x00000000, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; + chip::app::Clusters::UvFilterMonitoring::Commands::ResetCondition::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster IonizingFilterMonitoring | 0x0076 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCondition | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command UnlockWithTimeout + * Command ResetCondition */ -class DoorLockUnlockWithTimeout : public ClusterCommand +class IonizingFilterMonitoringResetCondition : public ClusterCommand { public: - DoorLockUnlockWithTimeout(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("unlock-with-timeout", credsIssuerConfig) + IonizingFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-condition", credsIssuerConfig) { - AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); - AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000076) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000003, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000076, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000076) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000076, 0x00000000, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; + chip::app::Clusters::IonizingFilterMonitoring::Commands::ResetCondition::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster ZeoliteFilterMonitoring | 0x0077 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCondition | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command SetWeekDaySchedule + * Command ResetCondition */ -class DoorLockSetWeekDaySchedule : public ClusterCommand +class ZeoliteFilterMonitoringResetCondition : public ClusterCommand { public: - DoorLockSetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-week-day-schedule", credsIssuerConfig) + ZeoliteFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-condition", credsIssuerConfig) { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); - AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); - AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); - AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); - AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000077) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000B, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000077, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000077) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000B, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000077, 0x00000000, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; + chip::app::Clusters::ZeoliteFilterMonitoring::Commands::ResetCondition::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster OzoneFilterMonitoring | 0x0078 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCondition | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command GetWeekDaySchedule + * Command ResetCondition */ -class DoorLockGetWeekDaySchedule : public ClusterCommand +class OzoneFilterMonitoringResetCondition : public ClusterCommand { public: - DoorLockGetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-week-day-schedule", credsIssuerConfig) + OzoneFilterMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-condition", credsIssuerConfig) { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000078) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000C, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000078, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000078) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000C, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000078, 0x00000000, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; + chip::app::Clusters::OzoneFilterMonitoring::Commands::ResetCondition::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster WaterTankMonitoring | 0x0079 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCondition | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command ClearWeekDaySchedule + * Command ResetCondition */ -class DoorLockClearWeekDaySchedule : public ClusterCommand +class WaterTankMonitoringResetCondition : public ClusterCommand { public: - DoorLockClearWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-week-day-schedule", credsIssuerConfig) + WaterTankMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-condition", credsIssuerConfig) { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000079) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000D, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000079, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000079) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000D, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000079, 0x00000000, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; + chip::app::Clusters::WaterTankMonitoring::Commands::ResetCondition::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster FuelTankMonitoring | 0x007A | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCondition | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command SetYearDaySchedule + * Command ResetCondition */ -class DoorLockSetYearDaySchedule : public ClusterCommand +class FuelTankMonitoringResetCondition : public ClusterCommand { public: - DoorLockSetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-year-day-schedule", credsIssuerConfig) + FuelTankMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-condition", credsIssuerConfig) { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000007A) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000E, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000007A, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000007A) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000E, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000007A, 0x00000000, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; + chip::app::Clusters::FuelTankMonitoring::Commands::ResetCondition::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster InkCartridgeMonitoring | 0x007B | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCondition | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command GetYearDaySchedule + * Command ResetCondition */ -class DoorLockGetYearDaySchedule : public ClusterCommand +class InkCartridgeMonitoringResetCondition : public ClusterCommand { public: - DoorLockGetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-year-day-schedule", credsIssuerConfig) + InkCartridgeMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-condition", credsIssuerConfig) { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000007B) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000F, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000007B, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000007B) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000F, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000007B, 0x00000000, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; + chip::app::Clusters::InkCartridgeMonitoring::Commands::ResetCondition::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster TonerCartridgeMonitoring | 0x007C | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCondition | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command ClearYearDaySchedule + * Command ResetCondition */ -class DoorLockClearYearDaySchedule : public ClusterCommand +class TonerCartridgeMonitoringResetCondition : public ClusterCommand { public: - DoorLockClearYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-year-day-schedule", credsIssuerConfig) + TonerCartridgeMonitoringResetCondition(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-condition", credsIssuerConfig) { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000007C) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000010, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000007C, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000007C) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000010, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000007C, 0x00000000, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; + chip::app::Clusters::TonerCartridgeMonitoring::Commands::ResetCondition::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster DoorLock | 0x0101 | +|------------------------------------------------------------------------------| +| Commands: | | +| * LockDoor | 0x00 | +| * UnlockDoor | 0x01 | +| * UnlockWithTimeout | 0x03 | +| * SetWeekDaySchedule | 0x0B | +| * GetWeekDaySchedule | 0x0C | +| * ClearWeekDaySchedule | 0x0D | +| * SetYearDaySchedule | 0x0E | +| * GetYearDaySchedule | 0x0F | +| * ClearYearDaySchedule | 0x10 | +| * SetHolidaySchedule | 0x11 | +| * GetHolidaySchedule | 0x12 | +| * ClearHolidaySchedule | 0x13 | +| * SetUser | 0x1A | +| * GetUser | 0x1B | +| * ClearUser | 0x1D | +| * SetCredential | 0x22 | +| * GetCredentialStatus | 0x24 | +| * ClearCredential | 0x26 | +| * UnboltDoor | 0x27 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LockState | 0x0000 | +| * LockType | 0x0001 | +| * ActuatorEnabled | 0x0002 | +| * DoorState | 0x0003 | +| * DoorOpenEvents | 0x0004 | +| * DoorClosedEvents | 0x0005 | +| * OpenPeriod | 0x0006 | +| * NumberOfTotalUsersSupported | 0x0011 | +| * NumberOfPINUsersSupported | 0x0012 | +| * NumberOfRFIDUsersSupported | 0x0013 | +| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | +| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | +| * NumberOfHolidaySchedulesSupported | 0x0016 | +| * MaxPINCodeLength | 0x0017 | +| * MinPINCodeLength | 0x0018 | +| * MaxRFIDCodeLength | 0x0019 | +| * MinRFIDCodeLength | 0x001A | +| * CredentialRulesSupport | 0x001B | +| * NumberOfCredentialsSupportedPerUser | 0x001C | +| * Language | 0x0021 | +| * LEDSettings | 0x0022 | +| * AutoRelockTime | 0x0023 | +| * SoundVolume | 0x0024 | +| * OperatingMode | 0x0025 | +| * SupportedOperatingModes | 0x0026 | +| * DefaultConfigurationRegister | 0x0027 | +| * EnableLocalProgramming | 0x0028 | +| * EnableOneTouchLocking | 0x0029 | +| * EnableInsideStatusLED | 0x002A | +| * EnablePrivacyModeButton | 0x002B | +| * LocalProgrammingFeatures | 0x002C | +| * WrongCodeEntryLimit | 0x0030 | +| * UserCodeTemporaryDisableTime | 0x0031 | +| * SendPINOverTheAir | 0x0032 | +| * RequirePINforRemoteOperation | 0x0033 | +| * ExpiringUserTimeout | 0x0035 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * DoorLockAlarm | 0x0000 | +| * DoorStateChange | 0x0001 | +| * LockOperation | 0x0002 | +| * LockOperationError | 0x0003 | +| * LockUserChange | 0x0004 | +\*----------------------------------------------------------------------------*/ + /* - * Command SetHolidaySchedule + * Command LockDoor */ -class DoorLockSetHolidaySchedule : public ClusterCommand +class DoorLockLockDoor : public ClusterCommand { public: - DoorLockSetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-holiday-schedule", credsIssuerConfig) + DoorLockLockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("lock-door", credsIssuerConfig) { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); + AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000011, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000011, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000000, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; + chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; }; /* - * Command GetHolidaySchedule + * Command UnlockDoor */ -class DoorLockGetHolidaySchedule : public ClusterCommand +class DoorLockUnlockDoor : public ClusterCommand { public: - DoorLockGetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-holiday-schedule", credsIssuerConfig) + DoorLockUnlockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unlock-door", credsIssuerConfig) { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000012, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000012, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000001, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; + chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; }; /* - * Command ClearHolidaySchedule + * Command UnlockWithTimeout */ -class DoorLockClearHolidaySchedule : public ClusterCommand +class DoorLockUnlockWithTimeout : public ClusterCommand { public: - DoorLockClearHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-holiday-schedule", credsIssuerConfig) + DoorLockUnlockWithTimeout(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("unlock-with-timeout", credsIssuerConfig) { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); + AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000013, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000013, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000003, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; + chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; }; /* - * Command SetUser + * Command SetWeekDaySchedule */ -class DoorLockSetUser : public ClusterCommand +class DoorLockSetWeekDaySchedule : public ClusterCommand { public: - DoorLockSetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-user", credsIssuerConfig) + DoorLockSetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-week-day-schedule", credsIssuerConfig) { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserName", &mRequest.userName); - AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); + AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); + AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); + AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); + AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); + AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001A, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000B, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001A, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000B, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; }; /* - * Command GetUser + * Command GetWeekDaySchedule */ -class DoorLockGetUser : public ClusterCommand +class DoorLockGetWeekDaySchedule : public ClusterCommand { public: - DoorLockGetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-user", credsIssuerConfig) + DoorLockGetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-week-day-schedule", credsIssuerConfig) { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001B, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000C, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001B, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000C, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; }; /* - * Command ClearUser + * Command ClearWeekDaySchedule */ -class DoorLockClearUser : public ClusterCommand +class DoorLockClearWeekDaySchedule : public ClusterCommand { public: - DoorLockClearUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("clear-user", credsIssuerConfig) + DoorLockClearWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-week-day-schedule", credsIssuerConfig) { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001D, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000D, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001D, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000D, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; }; /* - * Command SetCredential + * Command SetYearDaySchedule */ -class DoorLockSetCredential : public ClusterCommand +class DoorLockSetYearDaySchedule : public ClusterCommand { public: - DoorLockSetCredential(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) + DoorLockSetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-year-day-schedule", credsIssuerConfig) { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("Credential", &mComplex_Credential); - AddArgument("CredentialData", &mRequest.credentialData); + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000022, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000E, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000022, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000E, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; - TypedComplexArgument mComplex_Credential; + chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; }; /* - * Command GetCredentialStatus + * Command GetYearDaySchedule */ -class DoorLockGetCredentialStatus : public ClusterCommand +class DoorLockGetYearDaySchedule : public ClusterCommand { public: - DoorLockGetCredentialStatus(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-credential-status", credsIssuerConfig), mComplex_Credential(&mRequest.credential) + DoorLockGetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-year-day-schedule", credsIssuerConfig) { - AddArgument("Credential", &mComplex_Credential); + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000024, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000F, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000024, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000F, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; - TypedComplexArgument mComplex_Credential; + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; }; /* - * Command ClearCredential + * Command ClearYearDaySchedule */ -class DoorLockClearCredential : public ClusterCommand +class DoorLockClearYearDaySchedule : public ClusterCommand { public: - DoorLockClearCredential(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) + DoorLockClearYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-year-day-schedule", credsIssuerConfig) { - AddArgument("Credential", &mComplex_Credential); + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000026, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000010, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000026, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000010, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; - TypedComplexArgument> - mComplex_Credential; + chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; }; /* - * Command UnboltDoor + * Command SetHolidaySchedule */ -class DoorLockUnboltDoor : public ClusterCommand +class DoorLockSetHolidaySchedule : public ClusterCommand { public: - DoorLockUnboltDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unbolt-door", credsIssuerConfig) + DoorLockSetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-holiday-schedule", credsIssuerConfig) { - AddArgument("PINCode", &mRequest.PINCode); + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000027) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000027, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000011, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000027) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000027, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000011, mRequest); } private: - chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster WindowCovering | 0x0102 | -|------------------------------------------------------------------------------| -| Commands: | | -| * UpOrOpen | 0x00 | -| * DownOrClose | 0x01 | -| * StopMotion | 0x02 | -| * GoToLiftValue | 0x04 | -| * GoToLiftPercentage | 0x05 | -| * GoToTiltValue | 0x07 | -| * GoToTiltPercentage | 0x08 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Type | 0x0000 | -| * PhysicalClosedLimitLift | 0x0001 | -| * PhysicalClosedLimitTilt | 0x0002 | -| * CurrentPositionLift | 0x0003 | -| * CurrentPositionTilt | 0x0004 | -| * NumberOfActuationsLift | 0x0005 | -| * NumberOfActuationsTilt | 0x0006 | -| * ConfigStatus | 0x0007 | -| * CurrentPositionLiftPercentage | 0x0008 | -| * CurrentPositionTiltPercentage | 0x0009 | -| * OperationalStatus | 0x000A | -| * TargetPositionLiftPercent100ths | 0x000B | -| * TargetPositionTiltPercent100ths | 0x000C | -| * EndProductType | 0x000D | -| * CurrentPositionLiftPercent100ths | 0x000E | -| * CurrentPositionTiltPercent100ths | 0x000F | -| * InstalledOpenLimitLift | 0x0010 | -| * InstalledClosedLimitLift | 0x0011 | -| * InstalledOpenLimitTilt | 0x0012 | -| * InstalledClosedLimitTilt | 0x0013 | -| * Mode | 0x0017 | -| * SafetyStatus | 0x001A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command UpOrOpen + * Command GetHolidaySchedule */ -class WindowCoveringUpOrOpen : public ClusterCommand +class DoorLockGetHolidaySchedule : public ClusterCommand { public: - WindowCoveringUpOrOpen(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("up-or-open", credsIssuerConfig) + DoorLockGetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-holiday-schedule", credsIssuerConfig) { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000012, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000012, mRequest); } private: - chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; }; /* - * Command DownOrClose + * Command ClearHolidaySchedule */ -class WindowCoveringDownOrClose : public ClusterCommand +class DoorLockClearHolidaySchedule : public ClusterCommand { public: - WindowCoveringDownOrClose(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("down-or-close", credsIssuerConfig) + DoorLockClearHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-holiday-schedule", credsIssuerConfig) { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000013, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000013, mRequest); } private: - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; }; /* - * Command StopMotion + * Command SetUser */ -class WindowCoveringStopMotion : public ClusterCommand +class DoorLockSetUser : public ClusterCommand { public: - WindowCoveringStopMotion(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-motion", credsIssuerConfig) + DoorLockSetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-user", credsIssuerConfig) { + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserName", &mRequest.userName); + AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001A, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001A, mRequest); } private: - chip::app::Clusters::WindowCovering::Commands::StopMotion::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; }; /* - * Command GoToLiftValue + * Command GetUser */ -class WindowCoveringGoToLiftValue : public ClusterCommand +class DoorLockGetUser : public ClusterCommand { public: - WindowCoveringGoToLiftValue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-lift-value", credsIssuerConfig) + DoorLockGetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-user", credsIssuerConfig) { - AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000004, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001B, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001B, mRequest); } private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; }; /* - * Command GoToLiftPercentage + * Command ClearUser */ -class WindowCoveringGoToLiftPercentage : public ClusterCommand +class DoorLockClearUser : public ClusterCommand { public: - WindowCoveringGoToLiftPercentage(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-lift-percentage", credsIssuerConfig) + DoorLockClearUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("clear-user", credsIssuerConfig) { - AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000005, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001D, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001D, mRequest); } private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; }; /* - * Command GoToTiltValue + * Command SetCredential */ -class WindowCoveringGoToTiltValue : public ClusterCommand +class DoorLockSetCredential : public ClusterCommand { public: - WindowCoveringGoToTiltValue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-tilt-value", credsIssuerConfig) + DoorLockSetCredential(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) { - AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("Credential", &mComplex_Credential); + AddArgument("CredentialData", &mRequest.credentialData); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000007, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000022, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000007, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000022, mRequest); } private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; + TypedComplexArgument mComplex_Credential; }; /* - * Command GoToTiltPercentage + * Command GetCredentialStatus */ -class WindowCoveringGoToTiltPercentage : public ClusterCommand +class DoorLockGetCredentialStatus : public ClusterCommand { public: - WindowCoveringGoToTiltPercentage(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-tilt-percentage", credsIssuerConfig) + DoorLockGetCredentialStatus(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-credential-status", credsIssuerConfig), mComplex_Credential(&mRequest.credential) { - AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); + AddArgument("Credential", &mComplex_Credential); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000008, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000024, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000008, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000024, mRequest); } private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; + TypedComplexArgument mComplex_Credential; }; -/*----------------------------------------------------------------------------*\ -| Cluster BarrierControl | 0x0103 | -|------------------------------------------------------------------------------| -| Commands: | | -| * BarrierControlGoToPercent | 0x00 | -| * BarrierControlStop | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * BarrierMovingState | 0x0001 | -| * BarrierSafetyStatus | 0x0002 | -| * BarrierCapabilities | 0x0003 | -| * BarrierOpenEvents | 0x0004 | -| * BarrierCloseEvents | 0x0005 | -| * BarrierCommandOpenEvents | 0x0006 | -| * BarrierCommandCloseEvents | 0x0007 | -| * BarrierOpenPeriod | 0x0008 | -| * BarrierClosePeriod | 0x0009 | -| * BarrierPosition | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command BarrierControlGoToPercent + * Command ClearCredential */ -class BarrierControlBarrierControlGoToPercent : public ClusterCommand +class DoorLockClearCredential : public ClusterCommand { public: - BarrierControlBarrierControlGoToPercent(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("barrier-control-go-to-percent", credsIssuerConfig) + DoorLockClearCredential(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) { - AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); + AddArgument("Credential", &mComplex_Credential); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000026, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000026, mRequest); } private: - chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; + TypedComplexArgument> + mComplex_Credential; }; /* - * Command BarrierControlStop + * Command UnboltDoor */ -class BarrierControlBarrierControlStop : public ClusterCommand +class DoorLockUnboltDoor : public ClusterCommand { public: - BarrierControlBarrierControlStop(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("barrier-control-stop", credsIssuerConfig) + DoorLockUnboltDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unbolt-door", credsIssuerConfig) { + AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000027) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000027, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000027) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000027, mRequest); } private: - chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type mRequest; + chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster PumpConfigurationAndControl | 0x0200 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MaxPressure | 0x0000 | -| * MaxSpeed | 0x0001 | -| * MaxFlow | 0x0002 | -| * MinConstPressure | 0x0003 | -| * MaxConstPressure | 0x0004 | -| * MinCompPressure | 0x0005 | -| * MaxCompPressure | 0x0006 | -| * MinConstSpeed | 0x0007 | -| * MaxConstSpeed | 0x0008 | -| * MinConstFlow | 0x0009 | -| * MaxConstFlow | 0x000A | -| * MinConstTemp | 0x000B | -| * MaxConstTemp | 0x000C | -| * PumpStatus | 0x0010 | -| * EffectiveOperationMode | 0x0011 | -| * EffectiveControlMode | 0x0012 | -| * Capacity | 0x0013 | -| * Speed | 0x0014 | -| * LifetimeRunningHours | 0x0015 | -| * Power | 0x0016 | -| * LifetimeEnergyConsumed | 0x0017 | -| * OperationMode | 0x0020 | -| * ControlMode | 0x0021 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SupplyVoltageLow | 0x0000 | -| * SupplyVoltageHigh | 0x0001 | -| * PowerMissingPhase | 0x0002 | -| * SystemPressureLow | 0x0003 | -| * SystemPressureHigh | 0x0004 | -| * DryRunning | 0x0005 | -| * MotorTemperatureHigh | 0x0006 | -| * PumpMotorFatalFailure | 0x0007 | -| * ElectronicTemperatureHigh | 0x0008 | -| * PumpBlocked | 0x0009 | -| * SensorFailure | 0x000A | -| * ElectronicNonFatalFailure | 0x000B | -| * ElectronicFatalFailure | 0x000C | -| * GeneralFault | 0x000D | -| * Leakage | 0x000E | -| * AirDetection | 0x000F | -| * TurbineOperation | 0x0010 | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Thermostat | 0x0201 | +| Cluster WindowCovering | 0x0102 | |------------------------------------------------------------------------------| | Commands: | | -| * SetpointRaiseLower | 0x00 | -| * SetWeeklySchedule | 0x01 | -| * GetWeeklySchedule | 0x02 | -| * ClearWeeklySchedule | 0x03 | +| * UpOrOpen | 0x00 | +| * DownOrClose | 0x01 | +| * StopMotion | 0x02 | +| * GoToLiftValue | 0x04 | +| * GoToLiftPercentage | 0x05 | +| * GoToTiltValue | 0x07 | +| * GoToTiltPercentage | 0x08 | |------------------------------------------------------------------------------| | Attributes: | | -| * LocalTemperature | 0x0000 | -| * OutdoorTemperature | 0x0001 | -| * Occupancy | 0x0002 | -| * AbsMinHeatSetpointLimit | 0x0003 | -| * AbsMaxHeatSetpointLimit | 0x0004 | -| * AbsMinCoolSetpointLimit | 0x0005 | -| * AbsMaxCoolSetpointLimit | 0x0006 | -| * PICoolingDemand | 0x0007 | -| * PIHeatingDemand | 0x0008 | -| * HVACSystemTypeConfiguration | 0x0009 | -| * LocalTemperatureCalibration | 0x0010 | -| * OccupiedCoolingSetpoint | 0x0011 | -| * OccupiedHeatingSetpoint | 0x0012 | -| * UnoccupiedCoolingSetpoint | 0x0013 | -| * UnoccupiedHeatingSetpoint | 0x0014 | -| * MinHeatSetpointLimit | 0x0015 | -| * MaxHeatSetpointLimit | 0x0016 | -| * MinCoolSetpointLimit | 0x0017 | -| * MaxCoolSetpointLimit | 0x0018 | -| * MinSetpointDeadBand | 0x0019 | -| * RemoteSensing | 0x001A | -| * ControlSequenceOfOperation | 0x001B | -| * SystemMode | 0x001C | -| * ThermostatRunningMode | 0x001E | -| * StartOfWeek | 0x0020 | -| * NumberOfWeeklyTransitions | 0x0021 | -| * NumberOfDailyTransitions | 0x0022 | -| * TemperatureSetpointHold | 0x0023 | -| * TemperatureSetpointHoldDuration | 0x0024 | -| * ThermostatProgrammingOperationMode | 0x0025 | -| * ThermostatRunningState | 0x0029 | -| * SetpointChangeSource | 0x0030 | -| * SetpointChangeAmount | 0x0031 | -| * SetpointChangeSourceTimestamp | 0x0032 | -| * OccupiedSetback | 0x0034 | -| * OccupiedSetbackMin | 0x0035 | -| * OccupiedSetbackMax | 0x0036 | -| * UnoccupiedSetback | 0x0037 | -| * UnoccupiedSetbackMin | 0x0038 | -| * UnoccupiedSetbackMax | 0x0039 | -| * EmergencyHeatDelta | 0x003A | -| * ACType | 0x0040 | -| * ACCapacity | 0x0041 | -| * ACRefrigerantType | 0x0042 | -| * ACCompressorType | 0x0043 | -| * ACErrorCode | 0x0044 | -| * ACLouverPosition | 0x0045 | -| * ACCoilTemperature | 0x0046 | -| * ACCapacityformat | 0x0047 | +| * Type | 0x0000 | +| * PhysicalClosedLimitLift | 0x0001 | +| * PhysicalClosedLimitTilt | 0x0002 | +| * CurrentPositionLift | 0x0003 | +| * CurrentPositionTilt | 0x0004 | +| * NumberOfActuationsLift | 0x0005 | +| * NumberOfActuationsTilt | 0x0006 | +| * ConfigStatus | 0x0007 | +| * CurrentPositionLiftPercentage | 0x0008 | +| * CurrentPositionTiltPercentage | 0x0009 | +| * OperationalStatus | 0x000A | +| * TargetPositionLiftPercent100ths | 0x000B | +| * TargetPositionTiltPercent100ths | 0x000C | +| * EndProductType | 0x000D | +| * CurrentPositionLiftPercent100ths | 0x000E | +| * CurrentPositionTiltPercent100ths | 0x000F | +| * InstalledOpenLimitLift | 0x0010 | +| * InstalledClosedLimitLift | 0x0011 | +| * InstalledOpenLimitTilt | 0x0012 | +| * InstalledClosedLimitTilt | 0x0013 | +| * Mode | 0x0017 | +| * SafetyStatus | 0x001A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -6190,617 +6212,738 @@ class BarrierControlBarrierControlStop : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command SetpointRaiseLower + * Command UpOrOpen */ -class ThermostatSetpointRaiseLower : public ClusterCommand +class WindowCoveringUpOrOpen : public ClusterCommand { public: - ThermostatSetpointRaiseLower(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("setpoint-raise-lower", credsIssuerConfig) + WindowCoveringUpOrOpen(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("up-or-open", credsIssuerConfig) { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000000, mRequest); } private: - chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type mRequest; }; /* - * Command SetWeeklySchedule + * Command DownOrClose */ -class ThermostatSetWeeklySchedule : public ClusterCommand +class WindowCoveringDownOrClose : public ClusterCommand { public: - ThermostatSetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-weekly-schedule", credsIssuerConfig), mComplex_Transitions(&mRequest.transitions) + WindowCoveringDownOrClose(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("down-or-close", credsIssuerConfig) { - AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); - AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); - AddArgument("Transitions", &mComplex_Transitions); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000001, mRequest); } private: - chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument< - chip::app::DataModel::List> - mComplex_Transitions; + chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type mRequest; }; /* - * Command GetWeeklySchedule + * Command StopMotion */ -class ThermostatGetWeeklySchedule : public ClusterCommand +class WindowCoveringStopMotion : public ClusterCommand { public: - ThermostatGetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-weekly-schedule", credsIssuerConfig) + WindowCoveringStopMotion(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-motion", credsIssuerConfig) { - AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); - AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000002, mRequest); } private: - chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::StopMotion::Type mRequest; }; /* - * Command ClearWeeklySchedule + * Command GoToLiftValue */ -class ThermostatClearWeeklySchedule : public ClusterCommand +class WindowCoveringGoToLiftValue : public ClusterCommand { public: - ThermostatClearWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-weekly-schedule", credsIssuerConfig) + WindowCoveringGoToLiftValue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-lift-value", credsIssuerConfig) { + AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000003, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000004, mRequest); } private: - chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster FanControl | 0x0202 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Step | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * FanMode | 0x0000 | -| * FanModeSequence | 0x0001 | -| * PercentSetting | 0x0002 | -| * PercentCurrent | 0x0003 | -| * SpeedMax | 0x0004 | -| * SpeedSetting | 0x0005 | -| * SpeedCurrent | 0x0006 | -| * RockSupport | 0x0007 | -| * RockSetting | 0x0008 | -| * WindSupport | 0x0009 | -| * WindSetting | 0x000A | -| * AirflowDirection | 0x000B | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command Step + * Command GoToLiftPercentage */ -class FanControlStep : public ClusterCommand +class WindowCoveringGoToLiftPercentage : public ClusterCommand { public: - FanControlStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step", credsIssuerConfig) + WindowCoveringGoToLiftPercentage(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-lift-percentage", credsIssuerConfig) { - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("Wrap", 0, 1, &mRequest.wrap); - AddArgument("LowestOff", 0, 1, &mRequest.lowestOff); + AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000202, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000202, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000005, mRequest); } private: - chip::app::Clusters::FanControl::Commands::Step::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureDisplayMode | 0x0000 | -| * KeypadLockout | 0x0001 | -| * ScheduleProgrammingVisibility | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ColorControl | 0x0300 | -|------------------------------------------------------------------------------| -| Commands: | | -| * MoveToHue | 0x00 | -| * MoveHue | 0x01 | -| * StepHue | 0x02 | -| * MoveToSaturation | 0x03 | -| * MoveSaturation | 0x04 | -| * StepSaturation | 0x05 | -| * MoveToHueAndSaturation | 0x06 | -| * MoveToColor | 0x07 | -| * MoveColor | 0x08 | -| * StepColor | 0x09 | -| * MoveToColorTemperature | 0x0A | -| * EnhancedMoveToHue | 0x40 | -| * EnhancedMoveHue | 0x41 | -| * EnhancedStepHue | 0x42 | -| * EnhancedMoveToHueAndSaturation | 0x43 | -| * ColorLoopSet | 0x44 | -| * StopMoveStep | 0x47 | -| * MoveColorTemperature | 0x4B | -| * StepColorTemperature | 0x4C | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CurrentHue | 0x0000 | -| * CurrentSaturation | 0x0001 | -| * RemainingTime | 0x0002 | -| * CurrentX | 0x0003 | -| * CurrentY | 0x0004 | -| * DriftCompensation | 0x0005 | -| * CompensationText | 0x0006 | -| * ColorTemperatureMireds | 0x0007 | -| * ColorMode | 0x0008 | -| * Options | 0x000F | -| * NumberOfPrimaries | 0x0010 | -| * Primary1X | 0x0011 | -| * Primary1Y | 0x0012 | -| * Primary1Intensity | 0x0013 | -| * Primary2X | 0x0015 | -| * Primary2Y | 0x0016 | -| * Primary2Intensity | 0x0017 | -| * Primary3X | 0x0019 | -| * Primary3Y | 0x001A | -| * Primary3Intensity | 0x001B | -| * Primary4X | 0x0020 | -| * Primary4Y | 0x0021 | -| * Primary4Intensity | 0x0022 | -| * Primary5X | 0x0024 | -| * Primary5Y | 0x0025 | -| * Primary5Intensity | 0x0026 | -| * Primary6X | 0x0028 | -| * Primary6Y | 0x0029 | -| * Primary6Intensity | 0x002A | -| * WhitePointX | 0x0030 | -| * WhitePointY | 0x0031 | -| * ColorPointRX | 0x0032 | -| * ColorPointRY | 0x0033 | -| * ColorPointRIntensity | 0x0034 | -| * ColorPointGX | 0x0036 | -| * ColorPointGY | 0x0037 | -| * ColorPointGIntensity | 0x0038 | -| * ColorPointBX | 0x003A | -| * ColorPointBY | 0x003B | -| * ColorPointBIntensity | 0x003C | -| * EnhancedCurrentHue | 0x4000 | -| * EnhancedColorMode | 0x4001 | -| * ColorLoopActive | 0x4002 | -| * ColorLoopDirection | 0x4003 | -| * ColorLoopTime | 0x4004 | -| * ColorLoopStartEnhancedHue | 0x4005 | -| * ColorLoopStoredEnhancedHue | 0x4006 | -| * ColorCapabilities | 0x400A | -| * ColorTempPhysicalMinMireds | 0x400B | -| * ColorTempPhysicalMaxMireds | 0x400C | -| * CoupleColorTempToLevelMinMireds | 0x400D | -| * StartUpColorTemperatureMireds | 0x4010 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command MoveToHue + * Command GoToTiltValue */ -class ColorControlMoveToHue : public ClusterCommand +class WindowCoveringGoToTiltValue : public ClusterCommand { public: - ColorControlMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-hue", credsIssuerConfig) + WindowCoveringGoToTiltValue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-tilt-value", credsIssuerConfig) { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000007, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000007, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; }; /* - * Command MoveHue + * Command GoToTiltPercentage */ -class ColorControlMoveHue : public ClusterCommand +class WindowCoveringGoToTiltPercentage : public ClusterCommand { public: - ColorControlMoveHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-hue", credsIssuerConfig) + WindowCoveringGoToTiltPercentage(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-tilt-percentage", credsIssuerConfig) { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000008, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000008, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::MoveHue::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; }; -/* - * Command StepHue - */ -class ColorControlStepHue : public ClusterCommand -{ -public: - ColorControlStepHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-hue", credsIssuerConfig) +/*----------------------------------------------------------------------------*\ +| Cluster BarrierControl | 0x0103 | +|------------------------------------------------------------------------------| +| Commands: | | +| * BarrierControlGoToPercent | 0x00 | +| * BarrierControlStop | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * BarrierMovingState | 0x0001 | +| * BarrierSafetyStatus | 0x0002 | +| * BarrierCapabilities | 0x0003 | +| * BarrierOpenEvents | 0x0004 | +| * BarrierCloseEvents | 0x0005 | +| * BarrierCommandOpenEvents | 0x0006 | +| * BarrierCommandCloseEvents | 0x0007 | +| * BarrierOpenPeriod | 0x0008 | +| * BarrierClosePeriod | 0x0009 | +| * BarrierPosition | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command BarrierControlGoToPercent + */ +class BarrierControlBarrierControlGoToPercent : public ClusterCommand +{ +public: + BarrierControlBarrierControlGoToPercent(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("barrier-control-go-to-percent", credsIssuerConfig) { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000000, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::StepHue::Type mRequest; + chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; }; /* - * Command MoveToSaturation + * Command BarrierControlStop */ -class ColorControlMoveToSaturation : public ClusterCommand +class BarrierControlBarrierControlStop : public ClusterCommand { public: - ColorControlMoveToSaturation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-saturation", credsIssuerConfig) + BarrierControlBarrierControlStop(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("barrier-control-stop", credsIssuerConfig) { - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000003, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000001, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; + chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster PumpConfigurationAndControl | 0x0200 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MaxPressure | 0x0000 | +| * MaxSpeed | 0x0001 | +| * MaxFlow | 0x0002 | +| * MinConstPressure | 0x0003 | +| * MaxConstPressure | 0x0004 | +| * MinCompPressure | 0x0005 | +| * MaxCompPressure | 0x0006 | +| * MinConstSpeed | 0x0007 | +| * MaxConstSpeed | 0x0008 | +| * MinConstFlow | 0x0009 | +| * MaxConstFlow | 0x000A | +| * MinConstTemp | 0x000B | +| * MaxConstTemp | 0x000C | +| * PumpStatus | 0x0010 | +| * EffectiveOperationMode | 0x0011 | +| * EffectiveControlMode | 0x0012 | +| * Capacity | 0x0013 | +| * Speed | 0x0014 | +| * LifetimeRunningHours | 0x0015 | +| * Power | 0x0016 | +| * LifetimeEnergyConsumed | 0x0017 | +| * OperationMode | 0x0020 | +| * ControlMode | 0x0021 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * SupplyVoltageLow | 0x0000 | +| * SupplyVoltageHigh | 0x0001 | +| * PowerMissingPhase | 0x0002 | +| * SystemPressureLow | 0x0003 | +| * SystemPressureHigh | 0x0004 | +| * DryRunning | 0x0005 | +| * MotorTemperatureHigh | 0x0006 | +| * PumpMotorFatalFailure | 0x0007 | +| * ElectronicTemperatureHigh | 0x0008 | +| * PumpBlocked | 0x0009 | +| * SensorFailure | 0x000A | +| * ElectronicNonFatalFailure | 0x000B | +| * ElectronicFatalFailure | 0x000C | +| * GeneralFault | 0x000D | +| * Leakage | 0x000E | +| * AirDetection | 0x000F | +| * TurbineOperation | 0x0010 | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster Thermostat | 0x0201 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetpointRaiseLower | 0x00 | +| * SetWeeklySchedule | 0x01 | +| * GetWeeklySchedule | 0x02 | +| * ClearWeeklySchedule | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LocalTemperature | 0x0000 | +| * OutdoorTemperature | 0x0001 | +| * Occupancy | 0x0002 | +| * AbsMinHeatSetpointLimit | 0x0003 | +| * AbsMaxHeatSetpointLimit | 0x0004 | +| * AbsMinCoolSetpointLimit | 0x0005 | +| * AbsMaxCoolSetpointLimit | 0x0006 | +| * PICoolingDemand | 0x0007 | +| * PIHeatingDemand | 0x0008 | +| * HVACSystemTypeConfiguration | 0x0009 | +| * LocalTemperatureCalibration | 0x0010 | +| * OccupiedCoolingSetpoint | 0x0011 | +| * OccupiedHeatingSetpoint | 0x0012 | +| * UnoccupiedCoolingSetpoint | 0x0013 | +| * UnoccupiedHeatingSetpoint | 0x0014 | +| * MinHeatSetpointLimit | 0x0015 | +| * MaxHeatSetpointLimit | 0x0016 | +| * MinCoolSetpointLimit | 0x0017 | +| * MaxCoolSetpointLimit | 0x0018 | +| * MinSetpointDeadBand | 0x0019 | +| * RemoteSensing | 0x001A | +| * ControlSequenceOfOperation | 0x001B | +| * SystemMode | 0x001C | +| * ThermostatRunningMode | 0x001E | +| * StartOfWeek | 0x0020 | +| * NumberOfWeeklyTransitions | 0x0021 | +| * NumberOfDailyTransitions | 0x0022 | +| * TemperatureSetpointHold | 0x0023 | +| * TemperatureSetpointHoldDuration | 0x0024 | +| * ThermostatProgrammingOperationMode | 0x0025 | +| * ThermostatRunningState | 0x0029 | +| * SetpointChangeSource | 0x0030 | +| * SetpointChangeAmount | 0x0031 | +| * SetpointChangeSourceTimestamp | 0x0032 | +| * OccupiedSetback | 0x0034 | +| * OccupiedSetbackMin | 0x0035 | +| * OccupiedSetbackMax | 0x0036 | +| * UnoccupiedSetback | 0x0037 | +| * UnoccupiedSetbackMin | 0x0038 | +| * UnoccupiedSetbackMax | 0x0039 | +| * EmergencyHeatDelta | 0x003A | +| * ACType | 0x0040 | +| * ACCapacity | 0x0041 | +| * ACRefrigerantType | 0x0042 | +| * ACCompressorType | 0x0043 | +| * ACErrorCode | 0x0044 | +| * ACLouverPosition | 0x0045 | +| * ACCoilTemperature | 0x0046 | +| * ACCapacityformat | 0x0047 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command MoveSaturation + * Command SetpointRaiseLower */ -class ColorControlMoveSaturation : public ClusterCommand +class ThermostatSetpointRaiseLower : public ClusterCommand { public: - ColorControlMoveSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-saturation", credsIssuerConfig) + ThermostatSetpointRaiseLower(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("setpoint-raise-lower", credsIssuerConfig) { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); + AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000004, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000000, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; + chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; }; /* - * Command StepSaturation + * Command SetWeeklySchedule */ -class ColorControlStepSaturation : public ClusterCommand +class ThermostatSetWeeklySchedule : public ClusterCommand { public: - ColorControlStepSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-saturation", credsIssuerConfig) + ThermostatSetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-weekly-schedule", credsIssuerConfig), mComplex_Transitions(&mRequest.transitions) { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); + AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); + AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); + AddArgument("Transitions", &mComplex_Transitions); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000005, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000001, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; + chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; + TypedComplexArgument< + chip::app::DataModel::List> + mComplex_Transitions; }; /* - * Command MoveToHueAndSaturation + * Command GetWeeklySchedule */ -class ColorControlMoveToHueAndSaturation : public ClusterCommand +class ThermostatGetWeeklySchedule : public ClusterCommand { public: - ColorControlMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-hue-and-saturation", credsIssuerConfig) + ThermostatGetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-weekly-schedule", credsIssuerConfig) { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); + AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000006, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000006, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000002, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; + chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; }; /* - * Command MoveToColor + * Command ClearWeeklySchedule */ -class ColorControlMoveToColor : public ClusterCommand +class ThermostatClearWeeklySchedule : public ClusterCommand { public: - ColorControlMoveToColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-color", credsIssuerConfig) + ThermostatClearWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-weekly-schedule", credsIssuerConfig) { - AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); - AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000007, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000007, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000003, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; + chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster FanControl | 0x0202 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Step | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * FanMode | 0x0000 | +| * FanModeSequence | 0x0001 | +| * PercentSetting | 0x0002 | +| * PercentCurrent | 0x0003 | +| * SpeedMax | 0x0004 | +| * SpeedSetting | 0x0005 | +| * SpeedCurrent | 0x0006 | +| * RockSupport | 0x0007 | +| * RockSetting | 0x0008 | +| * WindSupport | 0x0009 | +| * WindSetting | 0x000A | +| * AirflowDirection | 0x000B | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command MoveColor + * Command Step */ -class ColorControlMoveColor : public ClusterCommand +class FanControlStep : public ClusterCommand { public: - ColorControlMoveColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-color", credsIssuerConfig) + FanControlStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step", credsIssuerConfig) { - AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); - AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("Wrap", 0, 1, &mRequest.wrap); + AddArgument("LowestOff", 0, 1, &mRequest.lowestOff); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000008, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000202, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000008, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000202, 0x00000000, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; + chip::app::Clusters::FanControl::Commands::Step::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TemperatureDisplayMode | 0x0000 | +| * KeypadLockout | 0x0001 | +| * ScheduleProgrammingVisibility | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster ColorControl | 0x0300 | +|------------------------------------------------------------------------------| +| Commands: | | +| * MoveToHue | 0x00 | +| * MoveHue | 0x01 | +| * StepHue | 0x02 | +| * MoveToSaturation | 0x03 | +| * MoveSaturation | 0x04 | +| * StepSaturation | 0x05 | +| * MoveToHueAndSaturation | 0x06 | +| * MoveToColor | 0x07 | +| * MoveColor | 0x08 | +| * StepColor | 0x09 | +| * MoveToColorTemperature | 0x0A | +| * EnhancedMoveToHue | 0x40 | +| * EnhancedMoveHue | 0x41 | +| * EnhancedStepHue | 0x42 | +| * EnhancedMoveToHueAndSaturation | 0x43 | +| * ColorLoopSet | 0x44 | +| * StopMoveStep | 0x47 | +| * MoveColorTemperature | 0x4B | +| * StepColorTemperature | 0x4C | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentHue | 0x0000 | +| * CurrentSaturation | 0x0001 | +| * RemainingTime | 0x0002 | +| * CurrentX | 0x0003 | +| * CurrentY | 0x0004 | +| * DriftCompensation | 0x0005 | +| * CompensationText | 0x0006 | +| * ColorTemperatureMireds | 0x0007 | +| * ColorMode | 0x0008 | +| * Options | 0x000F | +| * NumberOfPrimaries | 0x0010 | +| * Primary1X | 0x0011 | +| * Primary1Y | 0x0012 | +| * Primary1Intensity | 0x0013 | +| * Primary2X | 0x0015 | +| * Primary2Y | 0x0016 | +| * Primary2Intensity | 0x0017 | +| * Primary3X | 0x0019 | +| * Primary3Y | 0x001A | +| * Primary3Intensity | 0x001B | +| * Primary4X | 0x0020 | +| * Primary4Y | 0x0021 | +| * Primary4Intensity | 0x0022 | +| * Primary5X | 0x0024 | +| * Primary5Y | 0x0025 | +| * Primary5Intensity | 0x0026 | +| * Primary6X | 0x0028 | +| * Primary6Y | 0x0029 | +| * Primary6Intensity | 0x002A | +| * WhitePointX | 0x0030 | +| * WhitePointY | 0x0031 | +| * ColorPointRX | 0x0032 | +| * ColorPointRY | 0x0033 | +| * ColorPointRIntensity | 0x0034 | +| * ColorPointGX | 0x0036 | +| * ColorPointGY | 0x0037 | +| * ColorPointGIntensity | 0x0038 | +| * ColorPointBX | 0x003A | +| * ColorPointBY | 0x003B | +| * ColorPointBIntensity | 0x003C | +| * EnhancedCurrentHue | 0x4000 | +| * EnhancedColorMode | 0x4001 | +| * ColorLoopActive | 0x4002 | +| * ColorLoopDirection | 0x4003 | +| * ColorLoopTime | 0x4004 | +| * ColorLoopStartEnhancedHue | 0x4005 | +| * ColorLoopStoredEnhancedHue | 0x4006 | +| * ColorCapabilities | 0x400A | +| * ColorTempPhysicalMinMireds | 0x400B | +| * ColorTempPhysicalMaxMireds | 0x400C | +| * CoupleColorTempToLevelMinMireds | 0x400D | +| * StartUpColorTemperatureMireds | 0x4010 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command StepColor + * Command MoveToHue */ -class ColorControlStepColor : public ClusterCommand +class ColorControlMoveToHue : public ClusterCommand { public: - ColorControlStepColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-color", credsIssuerConfig) + ColorControlMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-hue", credsIssuerConfig) { - AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); - AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); @@ -6809,33 +6952,32 @@ class ColorControlStepColor : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000009, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000009, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000000, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type mRequest; }; /* - * Command MoveToColorTemperature + * Command MoveHue */ -class ColorControlMoveToColorTemperature : public ClusterCommand +class ColorControlMoveHue : public ClusterCommand { public: - ColorControlMoveToColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-color-temperature", credsIssuerConfig) + ColorControlMoveHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-hue", credsIssuerConfig) { - AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); @@ -6843,34 +6985,33 @@ class ColorControlMoveToColorTemperature : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000000A, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000000A, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000001, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveHue::Type mRequest; }; /* - * Command EnhancedMoveToHue + * Command StepHue */ -class ColorControlEnhancedMoveToHue : public ClusterCommand +class ColorControlStepHue : public ClusterCommand { public: - ColorControlEnhancedMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-move-to-hue", credsIssuerConfig) + ColorControlStepHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-hue", credsIssuerConfig) { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); @@ -6878,33 +7019,66 @@ class ColorControlEnhancedMoveToHue : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000040, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000040, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000002, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StepHue::Type mRequest; }; /* - * Command EnhancedMoveHue + * Command MoveToSaturation */ -class ColorControlEnhancedMoveHue : public ClusterCommand +class ColorControlMoveToSaturation : public ClusterCommand { public: - ColorControlEnhancedMoveHue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-move-hue", credsIssuerConfig) + ColorControlMoveToSaturation(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-saturation", credsIssuerConfig) + { + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000003, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000003, mRequest); + } + +private: + chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; +}; + +/* + * Command MoveSaturation + */ +class ColorControlMoveSaturation : public ClusterCommand +{ +public: + ColorControlMoveSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-saturation", credsIssuerConfig) { AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); @@ -6912,34 +7086,33 @@ class ColorControlEnhancedMoveHue : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000041, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000041, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000004, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; }; /* - * Command EnhancedStepHue + * Command StepSaturation */ -class ColorControlEnhancedStepHue : public ClusterCommand +class ColorControlStepSaturation : public ClusterCommand { public: - ColorControlEnhancedStepHue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-step-hue", credsIssuerConfig) + ColorControlStepSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-saturation", credsIssuerConfig) { AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); @@ -6947,32 +7120,32 @@ class ColorControlEnhancedStepHue : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000042, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000042, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000005, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; }; /* - * Command EnhancedMoveToHueAndSaturation + * Command MoveToHueAndSaturation */ -class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand +class ColorControlMoveToHueAndSaturation : public ClusterCommand { public: - ColorControlEnhancedMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-move-to-hue-and-saturation", credsIssuerConfig) + ColorControlMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-hue-and-saturation", credsIssuerConfig) { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); @@ -6982,35 +7155,33 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000043, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000006, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000043, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000006, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; }; /* - * Command ColorLoopSet + * Command MoveToColor */ -class ColorControlColorLoopSet : public ClusterCommand +class ColorControlMoveToColor : public ClusterCommand { public: - ColorControlColorLoopSet(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("color-loop-set", credsIssuerConfig) + ColorControlMoveToColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-color", credsIssuerConfig) { - AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); - AddArgument("Action", 0, UINT8_MAX, &mRequest.action); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("Time", 0, UINT16_MAX, &mRequest.time); - AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); + AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); + AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); @@ -7018,30 +7189,32 @@ class ColorControlColorLoopSet : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000044, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000007, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000044, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000007, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; }; /* - * Command StopMoveStep + * Command MoveColor */ -class ColorControlStopMoveStep : public ClusterCommand +class ColorControlMoveColor : public ClusterCommand { public: - ColorControlStopMoveStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-move-step", credsIssuerConfig) + ColorControlMoveColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-color", credsIssuerConfig) { + AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); + AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); @@ -7049,35 +7222,33 @@ class ColorControlStopMoveStep : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000047, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000008, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000047, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000008, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; }; /* - * Command MoveColorTemperature + * Command StepColor */ -class ColorControlMoveColorTemperature : public ClusterCommand +class ColorControlStepColor : public ClusterCommand { public: - ColorControlMoveColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-color-temperature", credsIssuerConfig) + ColorControlStepColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-color", credsIssuerConfig) { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); + AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); @@ -7085,36 +7256,33 @@ class ColorControlMoveColorTemperature : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000004B, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000009, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000004B, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000009, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; }; /* - * Command StepColorTemperature + * Command MoveToColorTemperature */ -class ColorControlStepColorTemperature : public ClusterCommand +class ColorControlMoveToColorTemperature : public ClusterCommand { public: - ColorControlStepColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("step-color-temperature", credsIssuerConfig) + ColorControlMoveToColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-color-temperature", credsIssuerConfig) { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); @@ -7122,72 +7290,351 @@ class ColorControlStepColorTemperature : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000004C, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000000A, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000004C, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000000A, mRequest); } private: - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster BallastConfiguration | 0x0301 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhysicalMinLevel | 0x0000 | -| * PhysicalMaxLevel | 0x0001 | -| * BallastStatus | 0x0002 | -| * MinLevel | 0x0010 | -| * MaxLevel | 0x0011 | -| * IntrinsicBallastFactor | 0x0014 | -| * BallastFactorAdjustment | 0x0015 | -| * LampQuantity | 0x0020 | -| * LampType | 0x0030 | -| * LampManufacturer | 0x0031 | -| * LampRatedHours | 0x0032 | -| * LampBurnHours | 0x0033 | -| * LampAlarmMode | 0x0034 | -| * LampBurnHoursTripPoint | 0x0035 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +/* + * Command EnhancedMoveToHue + */ +class ColorControlEnhancedMoveToHue : public ClusterCommand +{ +public: + ColorControlEnhancedMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-move-to-hue", credsIssuerConfig) + { + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } -/*----------------------------------------------------------------------------*\ -| Cluster IlluminanceMeasurement | 0x0400 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * LightSensorType | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000040, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000040, mRequest); + } + +private: + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; +}; + +/* + * Command EnhancedMoveHue + */ +class ColorControlEnhancedMoveHue : public ClusterCommand +{ +public: + ColorControlEnhancedMoveHue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-move-hue", credsIssuerConfig) + { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000041, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000041, mRequest); + } + +private: + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; +}; + +/* + * Command EnhancedStepHue + */ +class ColorControlEnhancedStepHue : public ClusterCommand +{ +public: + ColorControlEnhancedStepHue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-step-hue", credsIssuerConfig) + { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000042, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000042, mRequest); + } + +private: + chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; +}; + +/* + * Command EnhancedMoveToHueAndSaturation + */ +class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand +{ +public: + ColorControlEnhancedMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-move-to-hue-and-saturation", credsIssuerConfig) + { + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000043, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000043, mRequest); + } + +private: + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; +}; + +/* + * Command ColorLoopSet + */ +class ColorControlColorLoopSet : public ClusterCommand +{ +public: + ColorControlColorLoopSet(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("color-loop-set", credsIssuerConfig) + { + AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); + AddArgument("Action", 0, UINT8_MAX, &mRequest.action); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("Time", 0, UINT16_MAX, &mRequest.time); + AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000044, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000044, mRequest); + } + +private: + chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; +}; + +/* + * Command StopMoveStep + */ +class ColorControlStopMoveStep : public ClusterCommand +{ +public: + ColorControlStopMoveStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-move-step", credsIssuerConfig) + { + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000047, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000047, mRequest); + } + +private: + chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; +}; + +/* + * Command MoveColorTemperature + */ +class ColorControlMoveColorTemperature : public ClusterCommand +{ +public: + ColorControlMoveColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-color-temperature", credsIssuerConfig) + { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000004B, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000004B, mRequest); + } + +private: + chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; +}; + +/* + * Command StepColorTemperature + */ +class ColorControlStepColorTemperature : public ClusterCommand +{ +public: + ColorControlStepColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("step-color-temperature", credsIssuerConfig) + { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000004C, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000004C, mRequest); + } + +private: + chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster BallastConfiguration | 0x0301 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhysicalMinLevel | 0x0000 | +| * PhysicalMaxLevel | 0x0001 | +| * BallastStatus | 0x0002 | +| * MinLevel | 0x0010 | +| * MaxLevel | 0x0011 | +| * IntrinsicBallastFactor | 0x0014 | +| * BallastFactorAdjustment | 0x0015 | +| * LampQuantity | 0x0020 | +| * LampType | 0x0030 | +| * LampManufacturer | 0x0031 | +| * LampRatedHours | 0x0032 | +| * LampBurnHours | 0x0033 | +| * LampAlarmMode | 0x0034 | +| * LampBurnHoursTripPoint | 0x0035 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster IlluminanceMeasurement | 0x0400 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * LightSensorType | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ | Cluster TemperatureMeasurement | 0x0402 | @@ -11618,70 +12065,324 @@ void registerClusterBasicInformation(Commands & commands, CredentialIssuerComman make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "data-model-revision", Attributes::DataModelRevision::Id, credsIssuerConfig), // - make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // - make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // - make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // - make_unique(Id, "product-id", Attributes::ProductID::Id, credsIssuerConfig), // - make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // - make_unique(Id, "location", Attributes::Location::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // - make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // - make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // - make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // - make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // - make_unique(Id, "local-config-disabled", Attributes::LocalConfigDisabled::Id, credsIssuerConfig), // - make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // - make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // - make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // - make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "data-model-revision", Attributes::DataModelRevision::Id, credsIssuerConfig), // + make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // + make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // + make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // + make_unique(Id, "product-id", Attributes::ProductID::Id, credsIssuerConfig), // + make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // + make_unique(Id, "location", Attributes::Location::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // + make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // + make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // + make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // + make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // + make_unique(Id, "local-config-disabled", Attributes::LocalConfigDisabled::Id, credsIssuerConfig), // + make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // + make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // + make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // + make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // + make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // + make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // + make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // + make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // + make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // + make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} +void registerClusterOtaSoftwareUpdateProvider(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::OtaSoftwareUpdateProvider; + + const char * clusterName = "OtaSoftwareUpdateProvider"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} +void registerClusterOtaSoftwareUpdateRequestor(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::OtaSoftwareUpdateRequestor; + + const char * clusterName = "OtaSoftwareUpdateRequestor"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, credsIssuerConfig), // + make_unique(Id, "update-possible", Attributes::UpdatePossible::Id, credsIssuerConfig), // + make_unique(Id, "update-state", Attributes::UpdateState::Id, credsIssuerConfig), // + make_unique(Id, "update-state-progress", Attributes::UpdateStateProgress::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "update-possible", 0, 1, Attributes::UpdatePossible::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "update-state", 0, UINT8_MAX, Attributes::UpdateState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "update-state-progress", 0, UINT8_MAX, + Attributes::UpdateStateProgress::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, credsIssuerConfig), // + make_unique(Id, "update-possible", Attributes::UpdatePossible::Id, credsIssuerConfig), // + make_unique(Id, "update-state", Attributes::UpdateState::Id, credsIssuerConfig), // + make_unique(Id, "update-state-progress", Attributes::UpdateStateProgress::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-transition", Events::StateTransition::Id, credsIssuerConfig), // + make_unique(Id, "version-applied", Events::VersionApplied::Id, credsIssuerConfig), // + make_unique(Id, "download-error", Events::DownloadError::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-transition", Events::StateTransition::Id, credsIssuerConfig), // + make_unique(Id, "version-applied", Events::VersionApplied::Id, credsIssuerConfig), // + make_unique(Id, "download-error", Events::DownloadError::Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} +void registerClusterLocalizationConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::LocalizationConfiguration; + + const char * clusterName = "LocalizationConfiguration"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "active-locale", Attributes::ActiveLocale::Id, credsIssuerConfig), // + make_unique(Id, "supported-locales", Attributes::SupportedLocales::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "active-locale", Attributes::ActiveLocale::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>>( + Id, "supported-locales", Attributes::SupportedLocales::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "active-locale", Attributes::ActiveLocale::Id, credsIssuerConfig), // + make_unique(Id, "supported-locales", Attributes::SupportedLocales::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} +void registerClusterTimeFormatLocalization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::TimeFormatLocalization; + + const char * clusterName = "TimeFormatLocalization"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "hour-format", Attributes::HourFormat::Id, credsIssuerConfig), // + make_unique(Id, "active-calendar-type", Attributes::ActiveCalendarType::Id, credsIssuerConfig), // + make_unique(Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "hour-format", 0, UINT8_MAX, Attributes::HourFormat::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "active-calendar-type", 0, UINT8_MAX, Attributes::ActiveCalendarType::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>>( + Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "hour-format", Attributes::HourFormat::Id, credsIssuerConfig), // + make_unique(Id, "active-calendar-type", Attributes::ActiveCalendarType::Id, credsIssuerConfig), // + make_unique(Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::Id, + credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // - make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // - make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // - make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // - make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // - make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // - make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterOtaSoftwareUpdateProvider(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterUnitLocalization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::OtaSoftwareUpdateProvider; + using namespace chip::app::Clusters::UnitLocalization; - const char * clusterName = "OtaSoftwareUpdateProvider"; + const char * clusterName = "UnitLocalization"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "temperature-unit", Attributes::TemperatureUnit::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11689,6 +12390,8 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands, CredentialIss make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "temperature-unit", 0, UINT8_MAX, Attributes::TemperatureUnit::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -11703,6 +12406,7 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands, CredentialIss make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "temperature-unit", Attributes::TemperatureUnit::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11718,26 +12422,22 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands, CredentialIss commands.Register(clusterName, clusterCommands); } -void registerClusterOtaSoftwareUpdateRequestor(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterPowerSourceConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::OtaSoftwareUpdateRequestor; + using namespace chip::app::Clusters::PowerSourceConfiguration; - const char * clusterName = "OtaSoftwareUpdateRequestor"; + const char * clusterName = "PowerSourceConfiguration"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, credsIssuerConfig), // - make_unique(Id, "update-possible", Attributes::UpdatePossible::Id, credsIssuerConfig), // - make_unique(Id, "update-state", Attributes::UpdateState::Id, credsIssuerConfig), // - make_unique(Id, "update-state-progress", Attributes::UpdateStateProgress::Id, credsIssuerConfig), // + make_unique(Id, "sources", Attributes::Sources::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11745,16 +12445,172 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands, CredentialIs make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "update-possible", 0, 1, Attributes::UpdatePossible::Id, + make_unique>>( + Id, "sources", Attributes::Sources::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "sources", Attributes::Sources::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} +void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::PowerSource; + + const char * clusterName = "PowerSource"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // + make_unique(Id, "order", Attributes::Order::Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "wired-assessed-input-voltage", Attributes::WiredAssessedInputVoltage::Id, + credsIssuerConfig), // + make_unique(Id, "wired-assessed-input-frequency", Attributes::WiredAssessedInputFrequency::Id, + credsIssuerConfig), // + make_unique(Id, "wired-current-type", Attributes::WiredCurrentType::Id, credsIssuerConfig), // + make_unique(Id, "wired-assessed-current", Attributes::WiredAssessedCurrent::Id, credsIssuerConfig), // + make_unique(Id, "wired-nominal-voltage", Attributes::WiredNominalVoltage::Id, credsIssuerConfig), // + make_unique(Id, "wired-maximum-current", Attributes::WiredMaximumCurrent::Id, credsIssuerConfig), // + make_unique(Id, "wired-present", Attributes::WiredPresent::Id, credsIssuerConfig), // + make_unique(Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, credsIssuerConfig), // + make_unique(Id, "bat-voltage", Attributes::BatVoltage::Id, credsIssuerConfig), // + make_unique(Id, "bat-percent-remaining", Attributes::BatPercentRemaining::Id, credsIssuerConfig), // + make_unique(Id, "bat-time-remaining", Attributes::BatTimeRemaining::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-level", Attributes::BatChargeLevel::Id, credsIssuerConfig), // + make_unique(Id, "bat-replacement-needed", Attributes::BatReplacementNeeded::Id, credsIssuerConfig), // + make_unique(Id, "bat-replaceability", Attributes::BatReplaceability::Id, credsIssuerConfig), // + make_unique(Id, "bat-present", Attributes::BatPresent::Id, credsIssuerConfig), // + make_unique(Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, credsIssuerConfig), // + make_unique(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, + credsIssuerConfig), // + make_unique(Id, "bat-common-designation", Attributes::BatCommonDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-approved-chemistry", Attributes::BatApprovedChemistry::Id, credsIssuerConfig), // + make_unique(Id, "bat-capacity", Attributes::BatCapacity::Id, credsIssuerConfig), // + make_unique(Id, "bat-quantity", Attributes::BatQuantity::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-state", Attributes::BatChargeState::Id, credsIssuerConfig), // + make_unique(Id, "bat-time-to-full-charge", Attributes::BatTimeToFullCharge::Id, credsIssuerConfig), // + make_unique(Id, "bat-functional-while-charging", Attributes::BatFunctionalWhileCharging::Id, + credsIssuerConfig), // + make_unique(Id, "bat-charging-current", Attributes::BatChargingCurrent::Id, credsIssuerConfig), // + make_unique(Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "status", 0, UINT8_MAX, Attributes::Status::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "order", 0, UINT8_MAX, Attributes::Order::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>(Id, "wired-assessed-input-voltage", 0, UINT32_MAX, + Attributes::WiredAssessedInputVoltage::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "wired-assessed-input-frequency", 0, UINT16_MAX, + Attributes::WiredAssessedInputFrequency::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "wired-current-type", 0, UINT8_MAX, Attributes::WiredCurrentType::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>(Id, "wired-assessed-current", 0, UINT32_MAX, + Attributes::WiredAssessedCurrent::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "wired-nominal-voltage", 0, UINT32_MAX, Attributes::WiredNominalVoltage::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "wired-maximum-current", 0, UINT32_MAX, Attributes::WiredMaximumCurrent::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "wired-present", 0, 1, Attributes::WiredPresent::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "bat-voltage", 0, UINT32_MAX, Attributes::BatVoltage::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "bat-percent-remaining", 0, UINT8_MAX, + Attributes::BatPercentRemaining::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "bat-time-remaining", 0, UINT32_MAX, + Attributes::BatTimeRemaining::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-charge-level", 0, UINT8_MAX, Attributes::BatChargeLevel::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "bat-replacement-needed", 0, 1, Attributes::BatReplacementNeeded::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-replaceability", 0, UINT8_MAX, Attributes::BatReplaceability::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "bat-present", 0, 1, Attributes::BatPresent::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-common-designation", 0, UINT16_MAX, Attributes::BatCommonDesignation::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-approved-chemistry", 0, UINT16_MAX, Attributes::BatApprovedChemistry::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "bat-capacity", 0, UINT32_MAX, Attributes::BatCapacity::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "bat-quantity", 0, UINT8_MAX, Attributes::BatQuantity::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-charge-state", 0, UINT8_MAX, Attributes::BatChargeState::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>(Id, "bat-time-to-full-charge", 0, UINT32_MAX, + Attributes::BatTimeToFullCharge::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "bat-functional-while-charging", 0, 1, Attributes::BatFunctionalWhileCharging::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "update-state", 0, UINT8_MAX, Attributes::UpdateState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "update-state-progress", 0, UINT8_MAX, - Attributes::UpdateStateProgress::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "bat-charging-current", 0, UINT32_MAX, + Attributes::BatChargingCurrent::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -11767,12 +12623,44 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands, CredentialIs make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, credsIssuerConfig), // - make_unique(Id, "update-possible", Attributes::UpdatePossible::Id, credsIssuerConfig), // - make_unique(Id, "update-state", Attributes::UpdateState::Id, credsIssuerConfig), // - make_unique(Id, "update-state-progress", Attributes::UpdateStateProgress::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // + make_unique(Id, "order", Attributes::Order::Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "wired-assessed-input-voltage", Attributes::WiredAssessedInputVoltage::Id, + credsIssuerConfig), // + make_unique(Id, "wired-assessed-input-frequency", Attributes::WiredAssessedInputFrequency::Id, + credsIssuerConfig), // + make_unique(Id, "wired-current-type", Attributes::WiredCurrentType::Id, credsIssuerConfig), // + make_unique(Id, "wired-assessed-current", Attributes::WiredAssessedCurrent::Id, credsIssuerConfig), // + make_unique(Id, "wired-nominal-voltage", Attributes::WiredNominalVoltage::Id, credsIssuerConfig), // + make_unique(Id, "wired-maximum-current", Attributes::WiredMaximumCurrent::Id, credsIssuerConfig), // + make_unique(Id, "wired-present", Attributes::WiredPresent::Id, credsIssuerConfig), // + make_unique(Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, credsIssuerConfig), // + make_unique(Id, "bat-voltage", Attributes::BatVoltage::Id, credsIssuerConfig), // + make_unique(Id, "bat-percent-remaining", Attributes::BatPercentRemaining::Id, credsIssuerConfig), // + make_unique(Id, "bat-time-remaining", Attributes::BatTimeRemaining::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-level", Attributes::BatChargeLevel::Id, credsIssuerConfig), // + make_unique(Id, "bat-replacement-needed", Attributes::BatReplacementNeeded::Id, credsIssuerConfig), // + make_unique(Id, "bat-replaceability", Attributes::BatReplaceability::Id, credsIssuerConfig), // + make_unique(Id, "bat-present", Attributes::BatPresent::Id, credsIssuerConfig), // + make_unique(Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, credsIssuerConfig), // + make_unique(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, + credsIssuerConfig), // + make_unique(Id, "bat-common-designation", Attributes::BatCommonDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-approved-chemistry", Attributes::BatApprovedChemistry::Id, credsIssuerConfig), // + make_unique(Id, "bat-capacity", Attributes::BatCapacity::Id, credsIssuerConfig), // + make_unique(Id, "bat-quantity", Attributes::BatQuantity::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-state", Attributes::BatChargeState::Id, credsIssuerConfig), // + make_unique(Id, "bat-time-to-full-charge", Attributes::BatTimeToFullCharge::Id, credsIssuerConfig), // + make_unique(Id, "bat-functional-while-charging", Attributes::BatFunctionalWhileCharging::Id, + credsIssuerConfig), // + make_unique(Id, "bat-charging-current", Attributes::BatChargingCurrent::Id, credsIssuerConfig), // + make_unique(Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, + credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11782,35 +12670,42 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands, CredentialIs // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-transition", Events::StateTransition::Id, credsIssuerConfig), // - make_unique(Id, "version-applied", Events::VersionApplied::Id, credsIssuerConfig), // - make_unique(Id, "download-error", Events::DownloadError::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-transition", Events::StateTransition::Id, credsIssuerConfig), // - make_unique(Id, "version-applied", Events::VersionApplied::Id, credsIssuerConfig), // - make_unique(Id, "download-error", Events::DownloadError::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "wired-fault-change", Events::WiredFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "bat-fault-change", Events::BatFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-fault-change", Events::BatChargeFaultChange::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "wired-fault-change", Events::WiredFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "bat-fault-change", Events::BatFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-fault-change", Events::BatChargeFaultChange::Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterLocalizationConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterGeneralCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::LocalizationConfiguration; + using namespace chip::app::Clusters::GeneralCommissioning; - const char * clusterName = "LocalizationConfiguration"; + const char * clusterName = "GeneralCommissioning"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "active-locale", Attributes::ActiveLocale::Id, credsIssuerConfig), // - make_unique(Id, "supported-locales", Attributes::SupportedLocales::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "breadcrumb", Attributes::Breadcrumb::Id, credsIssuerConfig), // + make_unique(Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, credsIssuerConfig), // + make_unique(Id, "regulatory-config", Attributes::RegulatoryConfig::Id, credsIssuerConfig), // + make_unique(Id, "location-capability", Attributes::LocationCapability::Id, credsIssuerConfig), // + make_unique(Id, "supports-concurrent-connection", Attributes::SupportsConcurrentConnection::Id, + credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11818,10 +12713,19 @@ void registerClusterLocalizationConfiguration(Commands & commands, CredentialIss make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "active-locale", Attributes::ActiveLocale::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>>( - Id, "supported-locales", Attributes::SupportedLocales::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "breadcrumb", 0, UINT64_MAX, Attributes::Breadcrumb::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>( + Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "regulatory-config", 0, UINT8_MAX, Attributes::RegulatoryConfig::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "location-capability", 0, UINT8_MAX, Attributes::LocationCapability::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "supports-concurrent-connection", 0, 1, Attributes::SupportsConcurrentConnection::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -11834,10 +12738,15 @@ void registerClusterLocalizationConfiguration(Commands & commands, CredentialIss make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "active-locale", Attributes::ActiveLocale::Id, credsIssuerConfig), // - make_unique(Id, "supported-locales", Attributes::SupportedLocales::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "breadcrumb", Attributes::Breadcrumb::Id, credsIssuerConfig), // + make_unique(Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, + credsIssuerConfig), // + make_unique(Id, "regulatory-config", Attributes::RegulatoryConfig::Id, credsIssuerConfig), // + make_unique(Id, "location-capability", Attributes::LocationCapability::Id, credsIssuerConfig), // + make_unique(Id, "supports-concurrent-connection", Attributes::SupportsConcurrentConnection::Id, + credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11853,40 +12762,62 @@ void registerClusterLocalizationConfiguration(Commands & commands, CredentialIss commands.Register(clusterName, clusterCommands); } -void registerClusterTimeFormatLocalization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterNetworkCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::TimeFormatLocalization; + using namespace chip::app::Clusters::NetworkCommissioning; - const char * clusterName = "TimeFormatLocalization"; + const char * clusterName = "NetworkCommissioning"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "hour-format", Attributes::HourFormat::Id, credsIssuerConfig), // - make_unique(Id, "active-calendar-type", Attributes::ActiveCalendarType::Id, credsIssuerConfig), // - make_unique(Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>( - Id, "hour-format", 0, UINT8_MAX, Attributes::HourFormat::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>( - Id, "active-calendar-type", 0, UINT8_MAX, Attributes::ActiveCalendarType::Id, WriteCommandType::kWrite, - credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // + make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // + make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // + make_unique(Id, "connect-max-time-seconds", Attributes::ConnectMaxTimeSeconds::Id, credsIssuerConfig), // + make_unique(Id, "interface-enabled", Attributes::InterfaceEnabled::Id, credsIssuerConfig), // + make_unique(Id, "last-networking-status", Attributes::LastNetworkingStatus::Id, credsIssuerConfig), // + make_unique(Id, "last-network-id", Attributes::LastNetworkID::Id, credsIssuerConfig), // + make_unique(Id, "last-connect-error-value", Attributes::LastConnectErrorValue::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "max-networks", 0, UINT8_MAX, Attributes::MaxNetworks::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( - Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::Id, WriteCommandType::kForceWrite, + chip::app::DataModel::List>>( + Id, "networks", Attributes::Networks::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "scan-max-time-seconds", 0, UINT8_MAX, Attributes::ScanMaxTimeSeconds::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "connect-max-time-seconds", 0, UINT8_MAX, Attributes::ConnectMaxTimeSeconds::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "interface-enabled", 0, 1, Attributes::InterfaceEnabled::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>>( + Id, "last-networking-status", 0, UINT8_MAX, Attributes::LastNetworkingStatus::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "last-network-id", Attributes::LastNetworkID::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "last-connect-error-value", INT32_MIN, INT32_MAX, + Attributes::LastConnectErrorValue::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -11899,11 +12830,17 @@ void registerClusterTimeFormatLocalization(Commands & commands, CredentialIssuer make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "hour-format", Attributes::HourFormat::Id, credsIssuerConfig), // - make_unique(Id, "active-calendar-type", Attributes::ActiveCalendarType::Id, credsIssuerConfig), // - make_unique(Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // + make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // + make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // + make_unique(Id, "connect-max-time-seconds", Attributes::ConnectMaxTimeSeconds::Id, + credsIssuerConfig), // + make_unique(Id, "interface-enabled", Attributes::InterfaceEnabled::Id, credsIssuerConfig), // + make_unique(Id, "last-networking-status", Attributes::LastNetworkingStatus::Id, credsIssuerConfig), // + make_unique(Id, "last-network-id", Attributes::LastNetworkID::Id, credsIssuerConfig), // + make_unique(Id, "last-connect-error-value", Attributes::LastConnectErrorValue::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -11920,22 +12857,22 @@ void registerClusterTimeFormatLocalization(Commands & commands, CredentialIssuer commands.Register(clusterName, clusterCommands); } -void registerClusterUnitLocalization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterDiagnosticLogs(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::UnitLocalization; + using namespace chip::app::Clusters::DiagnosticLogs; - const char * clusterName = "UnitLocalization"; + const char * clusterName = "DiagnosticLogs"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "temperature-unit", Attributes::TemperatureUnit::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11943,8 +12880,6 @@ void registerClusterUnitLocalization(Commands & commands, CredentialIssuerComman make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>( - Id, "temperature-unit", 0, UINT8_MAX, Attributes::TemperatureUnit::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -11959,7 +12894,6 @@ void registerClusterUnitLocalization(Commands & commands, CredentialIssuerComman make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "temperature-unit", Attributes::TemperatureUnit::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11975,22 +12909,32 @@ void registerClusterUnitLocalization(Commands & commands, CredentialIssuerComman commands.Register(clusterName, clusterCommands); } -void registerClusterPowerSourceConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::PowerSourceConfiguration; + using namespace chip::app::Clusters::GeneralDiagnostics; - const char * clusterName = "PowerSourceConfiguration"; + const char * clusterName = "GeneralDiagnostics"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "sources", Attributes::Sources::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "network-interfaces", Attributes::NetworkInterfaces::Id, credsIssuerConfig), // + make_unique(Id, "reboot-count", Attributes::RebootCount::Id, credsIssuerConfig), // + make_unique(Id, "up-time", Attributes::UpTime::Id, credsIssuerConfig), // + make_unique(Id, "total-operational-hours", Attributes::TotalOperationalHours::Id, credsIssuerConfig), // + make_unique(Id, "boot-reason", Attributes::BootReason::Id, credsIssuerConfig), // + make_unique(Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, credsIssuerConfig), // + make_unique(Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, credsIssuerConfig), // + make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // + make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::Id, + credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11998,8 +12942,29 @@ void registerClusterPowerSourceConfiguration(Commands & commands, CredentialIssu make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "sources", Attributes::Sources::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "network-interfaces", Attributes::NetworkInterfaces::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "reboot-count", 0, UINT16_MAX, Attributes::RebootCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "up-time", 0, UINT64_MAX, Attributes::UpTime::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "total-operational-hours", 0, UINT32_MAX, Attributes::TotalOperationalHours::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "boot-reason", 0, UINT8_MAX, Attributes::BootReason::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "test-event-triggers-enabled", 0, 1, Attributes::TestEventTriggersEnabled::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12012,9 +12977,18 @@ void registerClusterPowerSourceConfiguration(Commands & commands, CredentialIssu make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "sources", Attributes::Sources::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "network-interfaces", Attributes::NetworkInterfaces::Id, credsIssuerConfig), // + make_unique(Id, "reboot-count", Attributes::RebootCount::Id, credsIssuerConfig), // + make_unique(Id, "up-time", Attributes::UpTime::Id, credsIssuerConfig), // + make_unique(Id, "total-operational-hours", Attributes::TotalOperationalHours::Id, credsIssuerConfig), // + make_unique(Id, "boot-reason", Attributes::BootReason::Id, credsIssuerConfig), // + make_unique(Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, credsIssuerConfig), // + make_unique(Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, credsIssuerConfig), // + make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // + make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::Id, + credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12024,195 +12998,76 @@ void registerClusterPowerSourceConfiguration(Commands & commands, CredentialIssu // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "hardware-fault-change", Events::HardwareFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "radio-fault-change", Events::RadioFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "boot-reason", Events::BootReason::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "hardware-fault-change", Events::HardwareFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "radio-fault-change", Events::RadioFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "boot-reason", Events::BootReason::Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterSoftwareDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::PowerSource; + using namespace chip::app::Clusters::SoftwareDiagnostics; - const char * clusterName = "PowerSource"; + const char * clusterName = "SoftwareDiagnostics"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // - make_unique(Id, "order", Attributes::Order::Id, credsIssuerConfig), // - make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "wired-assessed-input-voltage", Attributes::WiredAssessedInputVoltage::Id, - credsIssuerConfig), // - make_unique(Id, "wired-assessed-input-frequency", Attributes::WiredAssessedInputFrequency::Id, - credsIssuerConfig), // - make_unique(Id, "wired-current-type", Attributes::WiredCurrentType::Id, credsIssuerConfig), // - make_unique(Id, "wired-assessed-current", Attributes::WiredAssessedCurrent::Id, credsIssuerConfig), // - make_unique(Id, "wired-nominal-voltage", Attributes::WiredNominalVoltage::Id, credsIssuerConfig), // - make_unique(Id, "wired-maximum-current", Attributes::WiredMaximumCurrent::Id, credsIssuerConfig), // - make_unique(Id, "wired-present", Attributes::WiredPresent::Id, credsIssuerConfig), // - make_unique(Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, credsIssuerConfig), // - make_unique(Id, "bat-voltage", Attributes::BatVoltage::Id, credsIssuerConfig), // - make_unique(Id, "bat-percent-remaining", Attributes::BatPercentRemaining::Id, credsIssuerConfig), // - make_unique(Id, "bat-time-remaining", Attributes::BatTimeRemaining::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-level", Attributes::BatChargeLevel::Id, credsIssuerConfig), // - make_unique(Id, "bat-replacement-needed", Attributes::BatReplacementNeeded::Id, credsIssuerConfig), // - make_unique(Id, "bat-replaceability", Attributes::BatReplaceability::Id, credsIssuerConfig), // - make_unique(Id, "bat-present", Attributes::BatPresent::Id, credsIssuerConfig), // - make_unique(Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, credsIssuerConfig), // - make_unique(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "thread-metrics", Attributes::ThreadMetrics::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-free", Attributes::CurrentHeapFree::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-used", Attributes::CurrentHeapUsed::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-high-watermark", Attributes::CurrentHeapHighWatermark::Id, credsIssuerConfig), // - make_unique(Id, "bat-common-designation", Attributes::BatCommonDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-approved-chemistry", Attributes::BatApprovedChemistry::Id, credsIssuerConfig), // - make_unique(Id, "bat-capacity", Attributes::BatCapacity::Id, credsIssuerConfig), // - make_unique(Id, "bat-quantity", Attributes::BatQuantity::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-state", Attributes::BatChargeState::Id, credsIssuerConfig), // - make_unique(Id, "bat-time-to-full-charge", Attributes::BatTimeToFullCharge::Id, credsIssuerConfig), // - make_unique(Id, "bat-functional-while-charging", Attributes::BatFunctionalWhileCharging::Id, - credsIssuerConfig), // - make_unique(Id, "bat-charging-current", Attributes::BatChargingCurrent::Id, credsIssuerConfig), // - make_unique(Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>( - Id, "status", 0, UINT8_MAX, Attributes::Status::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "order", 0, UINT8_MAX, Attributes::Order::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>(Id, "wired-assessed-input-voltage", 0, UINT32_MAX, - Attributes::WiredAssessedInputVoltage::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "wired-assessed-input-frequency", 0, UINT16_MAX, - Attributes::WiredAssessedInputFrequency::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "wired-current-type", 0, UINT8_MAX, Attributes::WiredCurrentType::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>(Id, "wired-assessed-current", 0, UINT32_MAX, - Attributes::WiredAssessedCurrent::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "wired-nominal-voltage", 0, UINT32_MAX, Attributes::WiredNominalVoltage::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "wired-maximum-current", 0, UINT32_MAX, Attributes::WiredMaximumCurrent::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "wired-present", 0, 1, Attributes::WiredPresent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "bat-voltage", 0, UINT32_MAX, Attributes::BatVoltage::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "bat-percent-remaining", 0, UINT8_MAX, - Attributes::BatPercentRemaining::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "bat-time-remaining", 0, UINT32_MAX, - Attributes::BatTimeRemaining::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "bat-charge-level", 0, UINT8_MAX, Attributes::BatChargeLevel::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "bat-replacement-needed", 0, 1, Attributes::BatReplacementNeeded::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "bat-replaceability", 0, UINT8_MAX, Attributes::BatReplaceability::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "bat-present", 0, 1, Attributes::BatPresent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "bat-common-designation", 0, UINT16_MAX, Attributes::BatCommonDesignation::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "bat-approved-chemistry", 0, UINT16_MAX, Attributes::BatApprovedChemistry::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "bat-capacity", 0, UINT32_MAX, Attributes::BatCapacity::Id, + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "thread-metrics", Attributes::ThreadMetrics::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-heap-free", 0, UINT64_MAX, Attributes::CurrentHeapFree::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "bat-quantity", 0, UINT8_MAX, Attributes::BatQuantity::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "bat-charge-state", 0, UINT8_MAX, Attributes::BatChargeState::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>(Id, "bat-time-to-full-charge", 0, UINT32_MAX, - Attributes::BatTimeToFullCharge::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "bat-functional-while-charging", 0, 1, Attributes::BatFunctionalWhileCharging::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "bat-charging-current", 0, UINT32_MAX, - Attributes::BatChargingCurrent::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + make_unique>(Id, "current-heap-used", 0, UINT64_MAX, Attributes::CurrentHeapUsed::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // - make_unique(Id, "order", Attributes::Order::Id, credsIssuerConfig), // - make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "wired-assessed-input-voltage", Attributes::WiredAssessedInputVoltage::Id, - credsIssuerConfig), // - make_unique(Id, "wired-assessed-input-frequency", Attributes::WiredAssessedInputFrequency::Id, - credsIssuerConfig), // - make_unique(Id, "wired-current-type", Attributes::WiredCurrentType::Id, credsIssuerConfig), // - make_unique(Id, "wired-assessed-current", Attributes::WiredAssessedCurrent::Id, credsIssuerConfig), // - make_unique(Id, "wired-nominal-voltage", Attributes::WiredNominalVoltage::Id, credsIssuerConfig), // - make_unique(Id, "wired-maximum-current", Attributes::WiredMaximumCurrent::Id, credsIssuerConfig), // - make_unique(Id, "wired-present", Attributes::WiredPresent::Id, credsIssuerConfig), // - make_unique(Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, credsIssuerConfig), // - make_unique(Id, "bat-voltage", Attributes::BatVoltage::Id, credsIssuerConfig), // - make_unique(Id, "bat-percent-remaining", Attributes::BatPercentRemaining::Id, credsIssuerConfig), // - make_unique(Id, "bat-time-remaining", Attributes::BatTimeRemaining::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-level", Attributes::BatChargeLevel::Id, credsIssuerConfig), // - make_unique(Id, "bat-replacement-needed", Attributes::BatReplacementNeeded::Id, credsIssuerConfig), // - make_unique(Id, "bat-replaceability", Attributes::BatReplaceability::Id, credsIssuerConfig), // - make_unique(Id, "bat-present", Attributes::BatPresent::Id, credsIssuerConfig), // - make_unique(Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, credsIssuerConfig), // - make_unique(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, - credsIssuerConfig), // - make_unique(Id, "bat-common-designation", Attributes::BatCommonDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-approved-chemistry", Attributes::BatApprovedChemistry::Id, credsIssuerConfig), // - make_unique(Id, "bat-capacity", Attributes::BatCapacity::Id, credsIssuerConfig), // - make_unique(Id, "bat-quantity", Attributes::BatQuantity::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-state", Attributes::BatChargeState::Id, credsIssuerConfig), // - make_unique(Id, "bat-time-to-full-charge", Attributes::BatTimeToFullCharge::Id, credsIssuerConfig), // - make_unique(Id, "bat-functional-while-charging", Attributes::BatFunctionalWhileCharging::Id, - credsIssuerConfig), // - make_unique(Id, "bat-charging-current", Attributes::BatChargingCurrent::Id, credsIssuerConfig), // - make_unique(Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, + make_unique>(Id, "current-heap-high-watermark", 0, UINT64_MAX, + Attributes::CurrentHeapHighWatermark::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "thread-metrics", Attributes::ThreadMetrics::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-free", Attributes::CurrentHeapFree::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-used", Attributes::CurrentHeapUsed::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-high-watermark", Attributes::CurrentHeapHighWatermark::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -12223,154 +13078,253 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "wired-fault-change", Events::WiredFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "bat-fault-change", Events::BatFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-fault-change", Events::BatChargeFaultChange::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "wired-fault-change", Events::WiredFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "bat-fault-change", Events::BatFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-fault-change", Events::BatChargeFaultChange::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "software-fault", Events::SoftwareFault::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "software-fault", Events::SoftwareFault::Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterGeneralCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterThreadNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::GeneralCommissioning; + using namespace chip::app::Clusters::ThreadNetworkDiagnostics; - const char * clusterName = "GeneralCommissioning"; + const char * clusterName = "ThreadNetworkDiagnostics"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "breadcrumb", Attributes::Breadcrumb::Id, credsIssuerConfig), // - make_unique(Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, credsIssuerConfig), // - make_unique(Id, "regulatory-config", Attributes::RegulatoryConfig::Id, credsIssuerConfig), // - make_unique(Id, "location-capability", Attributes::LocationCapability::Id, credsIssuerConfig), // - make_unique(Id, "supports-concurrent-connection", Attributes::SupportsConcurrentConnection::Id, - credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "breadcrumb", 0, UINT64_MAX, Attributes::Breadcrumb::Id, WriteCommandType::kWrite, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "channel", Attributes::Channel::Id, credsIssuerConfig), // + make_unique(Id, "routing-role", Attributes::RoutingRole::Id, credsIssuerConfig), // + make_unique(Id, "network-name", Attributes::NetworkName::Id, credsIssuerConfig), // + make_unique(Id, "pan-id", Attributes::PanId::Id, credsIssuerConfig), // + make_unique(Id, "extended-pan-id", Attributes::ExtendedPanId::Id, credsIssuerConfig), // + make_unique(Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // + make_unique(Id, "neighbor-table", Attributes::NeighborTable::Id, credsIssuerConfig), // + make_unique(Id, "route-table", Attributes::RouteTable::Id, credsIssuerConfig), // + make_unique(Id, "partition-id", Attributes::PartitionId::Id, credsIssuerConfig), // + make_unique(Id, "weighting", Attributes::Weighting::Id, credsIssuerConfig), // + make_unique(Id, "data-version", Attributes::DataVersion::Id, credsIssuerConfig), // + make_unique(Id, "stable-data-version", Attributes::StableDataVersion::Id, credsIssuerConfig), // + make_unique(Id, "leader-router-id", Attributes::LeaderRouterId::Id, credsIssuerConfig), // + make_unique(Id, "detached-role-count", Attributes::DetachedRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "child-role-count", Attributes::ChildRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "router-role-count", Attributes::RouterRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "leader-role-count", Attributes::LeaderRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "attach-attempt-count", Attributes::AttachAttemptCount::Id, credsIssuerConfig), // + make_unique(Id, "partition-id-change-count", Attributes::PartitionIdChangeCount::Id, credsIssuerConfig), // + make_unique(Id, "better-partition-attach-attempt-count", Attributes::BetterPartitionAttachAttemptCount::Id, + credsIssuerConfig), // + make_unique(Id, "parent-change-count", Attributes::ParentChangeCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-total-count", Attributes::TxTotalCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-unicast-count", Attributes::TxUnicastCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-broadcast-count", Attributes::TxBroadcastCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-ack-requested-count", Attributes::TxAckRequestedCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-acked-count", Attributes::TxAckedCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-no-ack-requested-count", Attributes::TxNoAckRequestedCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-data-count", Attributes::TxDataCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-data-poll-count", Attributes::TxDataPollCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-beacon-count", Attributes::TxBeaconCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-beacon-request-count", Attributes::TxBeaconRequestCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-other-count", Attributes::TxOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-retry-count", Attributes::TxRetryCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-direct-max-retry-expiry-count", Attributes::TxDirectMaxRetryExpiryCount::Id, + credsIssuerConfig), // + make_unique(Id, "tx-indirect-max-retry-expiry-count", Attributes::TxIndirectMaxRetryExpiryCount::Id, + credsIssuerConfig), // + make_unique(Id, "tx-err-cca-count", Attributes::TxErrCcaCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-abort-count", Attributes::TxErrAbortCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-busy-channel-count", Attributes::TxErrBusyChannelCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-total-count", Attributes::RxTotalCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-unicast-count", Attributes::RxUnicastCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-broadcast-count", Attributes::RxBroadcastCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-data-count", Attributes::RxDataCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-data-poll-count", Attributes::RxDataPollCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-beacon-count", Attributes::RxBeaconCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-beacon-request-count", Attributes::RxBeaconRequestCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-other-count", Attributes::RxOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-address-filtered-count", Attributes::RxAddressFilteredCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-dest-addr-filtered-count", Attributes::RxDestAddrFilteredCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-duplicated-count", Attributes::RxDuplicatedCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-no-frame-count", Attributes::RxErrNoFrameCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-unknown-neighbor-count", Attributes::RxErrUnknownNeighborCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-err-invalid-src-addr-count", Attributes::RxErrInvalidSrcAddrCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-err-sec-count", Attributes::RxErrSecCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-fcs-count", Attributes::RxErrFcsCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-other-count", Attributes::RxErrOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "active-timestamp", Attributes::ActiveTimestamp::Id, credsIssuerConfig), // + make_unique(Id, "pending-timestamp", Attributes::PendingTimestamp::Id, credsIssuerConfig), // + make_unique(Id, "delay", Attributes::Delay::Id, credsIssuerConfig), // + make_unique(Id, "security-policy", Attributes::SecurityPolicy::Id, credsIssuerConfig), // + make_unique(Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, credsIssuerConfig), // + make_unique(Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, + credsIssuerConfig), // + make_unique(Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>(Id, "channel", 0, UINT16_MAX, Attributes::Channel::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "routing-role", 0, UINT8_MAX, Attributes::RoutingRole::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "network-name", Attributes::NetworkName::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "pan-id", 0, UINT16_MAX, Attributes::PanId::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "extended-pan-id", 0, UINT64_MAX, + Attributes::ExtendedPanId::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "neighbor-table", Attributes::NeighborTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "route-table", Attributes::RouteTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "partition-id", 0, UINT32_MAX, Attributes::PartitionId::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "weighting", 0, UINT8_MAX, Attributes::Weighting::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "data-version", 0, UINT8_MAX, Attributes::DataVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "stable-data-version", 0, UINT8_MAX, + Attributes::StableDataVersion::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "leader-router-id", 0, UINT8_MAX, + Attributes::LeaderRouterId::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "detached-role-count", 0, UINT16_MAX, Attributes::DetachedRoleCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "child-role-count", 0, UINT16_MAX, Attributes::ChildRoleCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "router-role-count", 0, UINT16_MAX, Attributes::RouterRoleCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "leader-role-count", 0, UINT16_MAX, Attributes::LeaderRoleCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "attach-attempt-count", 0, UINT16_MAX, Attributes::AttachAttemptCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "partition-id-change-count", 0, UINT16_MAX, + Attributes::PartitionIdChangeCount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "regulatory-config", 0, UINT8_MAX, Attributes::RegulatoryConfig::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "location-capability", 0, UINT8_MAX, Attributes::LocationCapability::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "supports-concurrent-connection", 0, 1, Attributes::SupportsConcurrentConnection::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + make_unique>(Id, "better-partition-attach-attempt-count", 0, UINT16_MAX, + Attributes::BetterPartitionAttachAttemptCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "parent-change-count", 0, UINT16_MAX, Attributes::ParentChangeCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-total-count", 0, UINT32_MAX, Attributes::TxTotalCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-unicast-count", 0, UINT32_MAX, Attributes::TxUnicastCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-broadcast-count", 0, UINT32_MAX, Attributes::TxBroadcastCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-ack-requested-count", 0, UINT32_MAX, Attributes::TxAckRequestedCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-acked-count", 0, UINT32_MAX, Attributes::TxAckedCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-no-ack-requested-count", 0, UINT32_MAX, Attributes::TxNoAckRequestedCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-data-count", 0, UINT32_MAX, Attributes::TxDataCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-data-poll-count", 0, UINT32_MAX, Attributes::TxDataPollCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-beacon-count", 0, UINT32_MAX, Attributes::TxBeaconCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-beacon-request-count", 0, UINT32_MAX, Attributes::TxBeaconRequestCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-other-count", 0, UINT32_MAX, Attributes::TxOtherCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-retry-count", 0, UINT32_MAX, Attributes::TxRetryCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-direct-max-retry-expiry-count", 0, UINT32_MAX, + Attributes::TxDirectMaxRetryExpiryCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "tx-indirect-max-retry-expiry-count", 0, UINT32_MAX, + Attributes::TxIndirectMaxRetryExpiryCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "tx-err-cca-count", 0, UINT32_MAX, Attributes::TxErrCcaCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-err-abort-count", 0, UINT32_MAX, Attributes::TxErrAbortCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-err-busy-channel-count", 0, UINT32_MAX, Attributes::TxErrBusyChannelCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-total-count", 0, UINT32_MAX, Attributes::RxTotalCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-unicast-count", 0, UINT32_MAX, Attributes::RxUnicastCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-broadcast-count", 0, UINT32_MAX, Attributes::RxBroadcastCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-data-count", 0, UINT32_MAX, Attributes::RxDataCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-data-poll-count", 0, UINT32_MAX, Attributes::RxDataPollCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-beacon-count", 0, UINT32_MAX, Attributes::RxBeaconCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-beacon-request-count", 0, UINT32_MAX, Attributes::RxBeaconRequestCount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "breadcrumb", Attributes::Breadcrumb::Id, credsIssuerConfig), // - make_unique(Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, - credsIssuerConfig), // - make_unique(Id, "regulatory-config", Attributes::RegulatoryConfig::Id, credsIssuerConfig), // - make_unique(Id, "location-capability", Attributes::LocationCapability::Id, credsIssuerConfig), // - make_unique(Id, "supports-concurrent-connection", Attributes::SupportsConcurrentConnection::Id, - credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - // - // Events - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - }; - - commands.Register(clusterName, clusterCommands); -} -void registerClusterNetworkCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::NetworkCommissioning; - - const char * clusterName = "NetworkCommissioning"; - - commands_list clusterCommands = { - // - // Commands - // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // - make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // - make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // - make_unique(Id, "connect-max-time-seconds", Attributes::ConnectMaxTimeSeconds::Id, credsIssuerConfig), // - make_unique(Id, "interface-enabled", Attributes::InterfaceEnabled::Id, credsIssuerConfig), // - make_unique(Id, "last-networking-status", Attributes::LastNetworkingStatus::Id, credsIssuerConfig), // - make_unique(Id, "last-network-id", Attributes::LastNetworkID::Id, credsIssuerConfig), // - make_unique(Id, "last-connect-error-value", Attributes::LastConnectErrorValue::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "max-networks", 0, UINT8_MAX, Attributes::MaxNetworks::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-other-count", 0, UINT32_MAX, Attributes::RxOtherCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-address-filtered-count", 0, UINT32_MAX, + Attributes::RxAddressFilteredCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "rx-dest-addr-filtered-count", 0, UINT32_MAX, + Attributes::RxDestAddrFilteredCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "rx-duplicated-count", 0, UINT32_MAX, Attributes::RxDuplicatedCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-err-no-frame-count", 0, UINT32_MAX, Attributes::RxErrNoFrameCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-err-unknown-neighbor-count", 0, UINT32_MAX, + Attributes::RxErrUnknownNeighborCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "rx-err-invalid-src-addr-count", 0, UINT32_MAX, + Attributes::RxErrInvalidSrcAddrCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "rx-err-sec-count", 0, UINT32_MAX, Attributes::RxErrSecCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-err-fcs-count", 0, UINT32_MAX, Attributes::RxErrFcsCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-err-other-count", 0, UINT32_MAX, Attributes::RxErrOtherCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "active-timestamp", 0, UINT64_MAX, + Attributes::ActiveTimestamp::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "pending-timestamp", 0, UINT64_MAX, + Attributes::PendingTimestamp::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "delay", 0, UINT32_MAX, Attributes::Delay::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( - Id, "networks", Attributes::Networks::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "scan-max-time-seconds", 0, UINT8_MAX, Attributes::ScanMaxTimeSeconds::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "connect-max-time-seconds", 0, UINT8_MAX, Attributes::ConnectMaxTimeSeconds::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "interface-enabled", 0, 1, Attributes::InterfaceEnabled::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>>( - Id, "last-networking-status", 0, UINT8_MAX, Attributes::LastNetworkingStatus::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + chip::app::DataModel::Nullable>>( + Id, "security-policy", Attributes::SecurityPolicy::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( - Id, "last-network-id", Attributes::LastNetworkID::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "last-connect-error-value", INT32_MIN, INT32_MAX, - Attributes::LastConnectErrorValue::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12383,17 +13337,82 @@ void registerClusterNetworkCommissioning(Commands & commands, CredentialIssuerCo make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // - make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // - make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // - make_unique(Id, "connect-max-time-seconds", Attributes::ConnectMaxTimeSeconds::Id, - credsIssuerConfig), // - make_unique(Id, "interface-enabled", Attributes::InterfaceEnabled::Id, credsIssuerConfig), // - make_unique(Id, "last-networking-status", Attributes::LastNetworkingStatus::Id, credsIssuerConfig), // - make_unique(Id, "last-network-id", Attributes::LastNetworkID::Id, credsIssuerConfig), // - make_unique(Id, "last-connect-error-value", Attributes::LastConnectErrorValue::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "channel", Attributes::Channel::Id, credsIssuerConfig), // + make_unique(Id, "routing-role", Attributes::RoutingRole::Id, credsIssuerConfig), // + make_unique(Id, "network-name", Attributes::NetworkName::Id, credsIssuerConfig), // + make_unique(Id, "pan-id", Attributes::PanId::Id, credsIssuerConfig), // + make_unique(Id, "extended-pan-id", Attributes::ExtendedPanId::Id, credsIssuerConfig), // + make_unique(Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // + make_unique(Id, "neighbor-table", Attributes::NeighborTable::Id, credsIssuerConfig), // + make_unique(Id, "route-table", Attributes::RouteTable::Id, credsIssuerConfig), // + make_unique(Id, "partition-id", Attributes::PartitionId::Id, credsIssuerConfig), // + make_unique(Id, "weighting", Attributes::Weighting::Id, credsIssuerConfig), // + make_unique(Id, "data-version", Attributes::DataVersion::Id, credsIssuerConfig), // + make_unique(Id, "stable-data-version", Attributes::StableDataVersion::Id, credsIssuerConfig), // + make_unique(Id, "leader-router-id", Attributes::LeaderRouterId::Id, credsIssuerConfig), // + make_unique(Id, "detached-role-count", Attributes::DetachedRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "child-role-count", Attributes::ChildRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "router-role-count", Attributes::RouterRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "leader-role-count", Attributes::LeaderRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "attach-attempt-count", Attributes::AttachAttemptCount::Id, credsIssuerConfig), // + make_unique(Id, "partition-id-change-count", Attributes::PartitionIdChangeCount::Id, + credsIssuerConfig), // + make_unique(Id, "better-partition-attach-attempt-count", + Attributes::BetterPartitionAttachAttemptCount::Id, credsIssuerConfig), // + make_unique(Id, "parent-change-count", Attributes::ParentChangeCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-total-count", Attributes::TxTotalCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-unicast-count", Attributes::TxUnicastCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-broadcast-count", Attributes::TxBroadcastCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-ack-requested-count", Attributes::TxAckRequestedCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-acked-count", Attributes::TxAckedCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-no-ack-requested-count", Attributes::TxNoAckRequestedCount::Id, + credsIssuerConfig), // + make_unique(Id, "tx-data-count", Attributes::TxDataCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-data-poll-count", Attributes::TxDataPollCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-beacon-count", Attributes::TxBeaconCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-beacon-request-count", Attributes::TxBeaconRequestCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-other-count", Attributes::TxOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-retry-count", Attributes::TxRetryCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-direct-max-retry-expiry-count", Attributes::TxDirectMaxRetryExpiryCount::Id, + credsIssuerConfig), // + make_unique(Id, "tx-indirect-max-retry-expiry-count", Attributes::TxIndirectMaxRetryExpiryCount::Id, + credsIssuerConfig), // + make_unique(Id, "tx-err-cca-count", Attributes::TxErrCcaCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-abort-count", Attributes::TxErrAbortCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-busy-channel-count", Attributes::TxErrBusyChannelCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-total-count", Attributes::RxTotalCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-unicast-count", Attributes::RxUnicastCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-broadcast-count", Attributes::RxBroadcastCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-data-count", Attributes::RxDataCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-data-poll-count", Attributes::RxDataPollCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-beacon-count", Attributes::RxBeaconCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-beacon-request-count", Attributes::RxBeaconRequestCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-other-count", Attributes::RxOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-address-filtered-count", Attributes::RxAddressFilteredCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-dest-addr-filtered-count", Attributes::RxDestAddrFilteredCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-duplicated-count", Attributes::RxDuplicatedCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-no-frame-count", Attributes::RxErrNoFrameCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-unknown-neighbor-count", Attributes::RxErrUnknownNeighborCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-err-invalid-src-addr-count", Attributes::RxErrInvalidSrcAddrCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-err-sec-count", Attributes::RxErrSecCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-fcs-count", Attributes::RxErrFcsCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-other-count", Attributes::RxErrOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "active-timestamp", Attributes::ActiveTimestamp::Id, credsIssuerConfig), // + make_unique(Id, "pending-timestamp", Attributes::PendingTimestamp::Id, credsIssuerConfig), // + make_unique(Id, "delay", Attributes::Delay::Id, credsIssuerConfig), // + make_unique(Id, "security-policy", Attributes::SecurityPolicy::Id, credsIssuerConfig), // + make_unique(Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, credsIssuerConfig), // + make_unique(Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, + credsIssuerConfig), // + make_unique(Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -12404,35 +13423,86 @@ void registerClusterNetworkCommissioning(Commands & commands, CredentialIssuerCo // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // + make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // + make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterDiagnosticLogs(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterWiFiNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::DiagnosticLogs; + using namespace chip::app::Clusters::WiFiNetworkDiagnostics; - const char * clusterName = "DiagnosticLogs"; + const char * clusterName = "WiFiNetworkDiagnostics"; commands_list clusterCommands = { // // Commands // make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "bssid", Attributes::Bssid::Id, credsIssuerConfig), // + make_unique(Id, "security-type", Attributes::SecurityType::Id, credsIssuerConfig), // + make_unique(Id, "wi-fi-version", Attributes::WiFiVersion::Id, credsIssuerConfig), // + make_unique(Id, "channel-number", Attributes::ChannelNumber::Id, credsIssuerConfig), // + make_unique(Id, "rssi", Attributes::Rssi::Id, credsIssuerConfig), // + make_unique(Id, "beacon-lost-count", Attributes::BeaconLostCount::Id, credsIssuerConfig), // + make_unique(Id, "beacon-rx-count", Attributes::BeaconRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-multicast-rx-count", Attributes::PacketMulticastRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-multicast-tx-count", Attributes::PacketMulticastTxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-unicast-rx-count", Attributes::PacketUnicastRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-unicast-tx-count", Attributes::PacketUnicastTxCount::Id, credsIssuerConfig), // + make_unique(Id, "current-max-rate", Attributes::CurrentMaxRate::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "bssid", Attributes::Bssid::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "security-type", 0, UINT8_MAX, Attributes::SecurityType::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "wi-fi-version", 0, UINT8_MAX, Attributes::WiFiVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "channel-number", 0, UINT16_MAX, + Attributes::ChannelNumber::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "rssi", INT8_MIN, INT8_MAX, Attributes::Rssi::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "beacon-lost-count", 0, UINT32_MAX, + Attributes::BeaconLostCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "beacon-rx-count", 0, UINT32_MAX, + Attributes::BeaconRxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "packet-multicast-rx-count", 0, UINT32_MAX, + Attributes::PacketMulticastRxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "packet-multicast-tx-count", 0, UINT32_MAX, + Attributes::PacketMulticastTxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "packet-unicast-rx-count", 0, UINT32_MAX, + Attributes::PacketUnicastRxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "packet-unicast-tx-count", 0, UINT32_MAX, + Attributes::PacketUnicastTxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "current-max-rate", 0, UINT64_MAX, + Attributes::CurrentMaxRate::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12445,49 +13515,69 @@ void registerClusterDiagnosticLogs(Commands & commands, CredentialIssuerCommands make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "bssid", Attributes::Bssid::Id, credsIssuerConfig), // + make_unique(Id, "security-type", Attributes::SecurityType::Id, credsIssuerConfig), // + make_unique(Id, "wi-fi-version", Attributes::WiFiVersion::Id, credsIssuerConfig), // + make_unique(Id, "channel-number", Attributes::ChannelNumber::Id, credsIssuerConfig), // + make_unique(Id, "rssi", Attributes::Rssi::Id, credsIssuerConfig), // + make_unique(Id, "beacon-lost-count", Attributes::BeaconLostCount::Id, credsIssuerConfig), // + make_unique(Id, "beacon-rx-count", Attributes::BeaconRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-multicast-rx-count", Attributes::PacketMulticastRxCount::Id, + credsIssuerConfig), // + make_unique(Id, "packet-multicast-tx-count", Attributes::PacketMulticastTxCount::Id, + credsIssuerConfig), // + make_unique(Id, "packet-unicast-rx-count", Attributes::PacketUnicastRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-unicast-tx-count", Attributes::PacketUnicastTxCount::Id, credsIssuerConfig), // + make_unique(Id, "current-max-rate", Attributes::CurrentMaxRate::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "disconnection", Events::Disconnection::Id, credsIssuerConfig), // + make_unique(Id, "association-failure", Events::AssociationFailure::Id, credsIssuerConfig), // + make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "disconnection", Events::Disconnection::Id, credsIssuerConfig), // + make_unique(Id, "association-failure", Events::AssociationFailure::Id, credsIssuerConfig), // + make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterEthernetNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::GeneralDiagnostics; + using namespace chip::app::Clusters::EthernetNetworkDiagnostics; - const char * clusterName = "GeneralDiagnostics"; + const char * clusterName = "EthernetNetworkDiagnostics"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "network-interfaces", Attributes::NetworkInterfaces::Id, credsIssuerConfig), // - make_unique(Id, "reboot-count", Attributes::RebootCount::Id, credsIssuerConfig), // - make_unique(Id, "up-time", Attributes::UpTime::Id, credsIssuerConfig), // - make_unique(Id, "total-operational-hours", Attributes::TotalOperationalHours::Id, credsIssuerConfig), // - make_unique(Id, "boot-reason", Attributes::BootReason::Id, credsIssuerConfig), // - make_unique(Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, credsIssuerConfig), // - make_unique(Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, credsIssuerConfig), // - make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // - make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::Id, - credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "phyrate", Attributes::PHYRate::Id, credsIssuerConfig), // + make_unique(Id, "full-duplex", Attributes::FullDuplex::Id, credsIssuerConfig), // + make_unique(Id, "packet-rx-count", Attributes::PacketRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-tx-count", Attributes::PacketTxCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-count", Attributes::TxErrCount::Id, credsIssuerConfig), // + make_unique(Id, "collision-count", Attributes::CollisionCount::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // + make_unique(Id, "carrier-detect", Attributes::CarrierDetect::Id, credsIssuerConfig), // + make_unique(Id, "time-since-reset", Attributes::TimeSinceReset::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12495,29 +13585,24 @@ void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerComm make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "network-interfaces", Attributes::NetworkInterfaces::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "reboot-count", 0, UINT16_MAX, Attributes::RebootCount::Id, + make_unique>>( + Id, "phyrate", 0, UINT8_MAX, Attributes::PHYRate::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "full-duplex", 0, 1, Attributes::FullDuplex::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "packet-rx-count", 0, UINT64_MAX, Attributes::PacketRxCount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "up-time", 0, UINT64_MAX, Attributes::UpTime::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "total-operational-hours", 0, UINT32_MAX, Attributes::TotalOperationalHours::Id, + make_unique>(Id, "packet-tx-count", 0, UINT64_MAX, Attributes::PacketTxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-err-count", 0, UINT64_MAX, Attributes::TxErrCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "collision-count", 0, UINT64_MAX, Attributes::CollisionCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "carrier-detect", 0, 1, Attributes::CarrierDetect::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "time-since-reset", 0, UINT64_MAX, Attributes::TimeSinceReset::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "boot-reason", 0, UINT8_MAX, Attributes::BootReason::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "test-event-triggers-enabled", 0, 1, Attributes::TestEventTriggersEnabled::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12530,18 +13615,17 @@ void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerComm make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "network-interfaces", Attributes::NetworkInterfaces::Id, credsIssuerConfig), // - make_unique(Id, "reboot-count", Attributes::RebootCount::Id, credsIssuerConfig), // - make_unique(Id, "up-time", Attributes::UpTime::Id, credsIssuerConfig), // - make_unique(Id, "total-operational-hours", Attributes::TotalOperationalHours::Id, credsIssuerConfig), // - make_unique(Id, "boot-reason", Attributes::BootReason::Id, credsIssuerConfig), // - make_unique(Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, credsIssuerConfig), // - make_unique(Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, credsIssuerConfig), // - make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // - make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::Id, - credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "phyrate", Attributes::PHYRate::Id, credsIssuerConfig), // + make_unique(Id, "full-duplex", Attributes::FullDuplex::Id, credsIssuerConfig), // + make_unique(Id, "packet-rx-count", Attributes::PacketRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-tx-count", Attributes::PacketTxCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-count", Attributes::TxErrCount::Id, credsIssuerConfig), // + make_unique(Id, "collision-count", Attributes::CollisionCount::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // + make_unique(Id, "carrier-detect", Attributes::CarrierDetect::Id, credsIssuerConfig), // + make_unique(Id, "time-since-reset", Attributes::TimeSinceReset::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12551,58 +13635,82 @@ void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerComm // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "hardware-fault-change", Events::HardwareFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "radio-fault-change", Events::RadioFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "boot-reason", Events::BootReason::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "hardware-fault-change", Events::HardwareFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "radio-fault-change", Events::RadioFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "boot-reason", Events::BootReason::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterSoftwareDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterTimeSynchronization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::SoftwareDiagnostics; + using namespace chip::app::Clusters::TimeSynchronization; - const char * clusterName = "SoftwareDiagnostics"; + const char * clusterName = "TimeSynchronization"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "thread-metrics", Attributes::ThreadMetrics::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-free", Attributes::CurrentHeapFree::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-used", Attributes::CurrentHeapUsed::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-high-watermark", Attributes::CurrentHeapHighWatermark::Id, - credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "utctime", Attributes::UTCTime::Id, credsIssuerConfig), // + make_unique(Id, "granularity", Attributes::Granularity::Id, credsIssuerConfig), // + make_unique(Id, "time-source", Attributes::TimeSource::Id, credsIssuerConfig), // + make_unique(Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, credsIssuerConfig), // + make_unique(Id, "default-ntp", Attributes::DefaultNTP::Id, credsIssuerConfig), // + make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // + make_unique(Id, "dstoffset", Attributes::DSTOffset::Id, credsIssuerConfig), // + make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-database", Attributes::TimeZoneDatabase::Id, credsIssuerConfig), // + make_unique(Id, "ntpserver-available", Attributes::NTPServerAvailable::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-list-max-size", Attributes::TimeZoneListMaxSize::Id, credsIssuerConfig), // + make_unique(Id, "dstoffset-list-max-size", Attributes::DSTOffsetListMaxSize::Id, credsIssuerConfig), // + make_unique(Id, "supports-dnsresolve", Attributes::SupportsDNSResolve::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>(Id, "utctime", 0, UINT64_MAX, Attributes::UTCTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "granularity", 0, UINT8_MAX, Attributes::Granularity::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "time-source", 0, UINT8_MAX, Attributes::TimeSource::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( - Id, "thread-metrics", Attributes::ThreadMetrics::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-heap-free", 0, UINT64_MAX, Attributes::CurrentHeapFree::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-heap-used", 0, UINT64_MAX, Attributes::CurrentHeapUsed::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-heap-high-watermark", 0, UINT64_MAX, - Attributes::CurrentHeapHighWatermark::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + chip::app::DataModel::Nullable>>( + Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "default-ntp", Attributes::DefaultNTP::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "time-zone", Attributes::TimeZone::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "dstoffset", Attributes::DSTOffset::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "local-time", 0, UINT64_MAX, Attributes::LocalTime::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "time-zone-database", 0, UINT8_MAX, Attributes::TimeZoneDatabase::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "ntpserver-available", 0, 1, Attributes::NTPServerAvailable::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "time-zone-list-max-size", 0, UINT8_MAX, Attributes::TimeZoneListMaxSize::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "dstoffset-list-max-size", 0, UINT8_MAX, Attributes::DSTOffsetListMaxSize::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "supports-dnsresolve", 0, 1, Attributes::SupportsDNSResolve::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12615,269 +13723,117 @@ void registerClusterSoftwareDiagnostics(Commands & commands, CredentialIssuerCom make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "thread-metrics", Attributes::ThreadMetrics::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-free", Attributes::CurrentHeapFree::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-used", Attributes::CurrentHeapUsed::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-high-watermark", Attributes::CurrentHeapHighWatermark::Id, - credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - // - // Events - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "software-fault", Events::SoftwareFault::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "software-fault", Events::SoftwareFault::Id, credsIssuerConfig), // - }; - - commands.Register(clusterName, clusterCommands); -} -void registerClusterThreadNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::ThreadNetworkDiagnostics; - - const char * clusterName = "ThreadNetworkDiagnostics"; - - commands_list clusterCommands = { - // - // Commands - // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "channel", Attributes::Channel::Id, credsIssuerConfig), // - make_unique(Id, "routing-role", Attributes::RoutingRole::Id, credsIssuerConfig), // - make_unique(Id, "network-name", Attributes::NetworkName::Id, credsIssuerConfig), // - make_unique(Id, "pan-id", Attributes::PanId::Id, credsIssuerConfig), // - make_unique(Id, "extended-pan-id", Attributes::ExtendedPanId::Id, credsIssuerConfig), // - make_unique(Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // - make_unique(Id, "neighbor-table", Attributes::NeighborTable::Id, credsIssuerConfig), // - make_unique(Id, "route-table", Attributes::RouteTable::Id, credsIssuerConfig), // - make_unique(Id, "partition-id", Attributes::PartitionId::Id, credsIssuerConfig), // - make_unique(Id, "weighting", Attributes::Weighting::Id, credsIssuerConfig), // - make_unique(Id, "data-version", Attributes::DataVersion::Id, credsIssuerConfig), // - make_unique(Id, "stable-data-version", Attributes::StableDataVersion::Id, credsIssuerConfig), // - make_unique(Id, "leader-router-id", Attributes::LeaderRouterId::Id, credsIssuerConfig), // - make_unique(Id, "detached-role-count", Attributes::DetachedRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "child-role-count", Attributes::ChildRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "router-role-count", Attributes::RouterRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "leader-role-count", Attributes::LeaderRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "attach-attempt-count", Attributes::AttachAttemptCount::Id, credsIssuerConfig), // - make_unique(Id, "partition-id-change-count", Attributes::PartitionIdChangeCount::Id, credsIssuerConfig), // - make_unique(Id, "better-partition-attach-attempt-count", Attributes::BetterPartitionAttachAttemptCount::Id, - credsIssuerConfig), // - make_unique(Id, "parent-change-count", Attributes::ParentChangeCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-total-count", Attributes::TxTotalCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-unicast-count", Attributes::TxUnicastCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-broadcast-count", Attributes::TxBroadcastCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-ack-requested-count", Attributes::TxAckRequestedCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-acked-count", Attributes::TxAckedCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-no-ack-requested-count", Attributes::TxNoAckRequestedCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-data-count", Attributes::TxDataCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-data-poll-count", Attributes::TxDataPollCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-beacon-count", Attributes::TxBeaconCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-beacon-request-count", Attributes::TxBeaconRequestCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-other-count", Attributes::TxOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-retry-count", Attributes::TxRetryCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-direct-max-retry-expiry-count", Attributes::TxDirectMaxRetryExpiryCount::Id, - credsIssuerConfig), // - make_unique(Id, "tx-indirect-max-retry-expiry-count", Attributes::TxIndirectMaxRetryExpiryCount::Id, - credsIssuerConfig), // - make_unique(Id, "tx-err-cca-count", Attributes::TxErrCcaCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-abort-count", Attributes::TxErrAbortCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-busy-channel-count", Attributes::TxErrBusyChannelCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-total-count", Attributes::RxTotalCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-unicast-count", Attributes::RxUnicastCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-broadcast-count", Attributes::RxBroadcastCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-data-count", Attributes::RxDataCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-data-poll-count", Attributes::RxDataPollCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-beacon-count", Attributes::RxBeaconCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-beacon-request-count", Attributes::RxBeaconRequestCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-other-count", Attributes::RxOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-address-filtered-count", Attributes::RxAddressFilteredCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-dest-addr-filtered-count", Attributes::RxDestAddrFilteredCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-duplicated-count", Attributes::RxDuplicatedCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-no-frame-count", Attributes::RxErrNoFrameCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-unknown-neighbor-count", Attributes::RxErrUnknownNeighborCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-err-invalid-src-addr-count", Attributes::RxErrInvalidSrcAddrCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-err-sec-count", Attributes::RxErrSecCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-fcs-count", Attributes::RxErrFcsCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-other-count", Attributes::RxErrOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "active-timestamp", Attributes::ActiveTimestamp::Id, credsIssuerConfig), // - make_unique(Id, "pending-timestamp", Attributes::PendingTimestamp::Id, credsIssuerConfig), // - make_unique(Id, "delay", Attributes::Delay::Id, credsIssuerConfig), // - make_unique(Id, "security-policy", Attributes::SecurityPolicy::Id, credsIssuerConfig), // - make_unique(Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, credsIssuerConfig), // - make_unique(Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, - credsIssuerConfig), // - make_unique(Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>(Id, "channel", 0, UINT16_MAX, Attributes::Channel::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "routing-role", 0, UINT8_MAX, Attributes::RoutingRole::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "network-name", Attributes::NetworkName::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "pan-id", 0, UINT16_MAX, Attributes::PanId::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "extended-pan-id", 0, UINT64_MAX, - Attributes::ExtendedPanId::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "neighbor-table", Attributes::NeighborTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "route-table", Attributes::RouteTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "partition-id", 0, UINT32_MAX, Attributes::PartitionId::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "weighting", 0, UINT8_MAX, Attributes::Weighting::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "data-version", 0, UINT8_MAX, Attributes::DataVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "stable-data-version", 0, UINT8_MAX, - Attributes::StableDataVersion::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "leader-router-id", 0, UINT8_MAX, - Attributes::LeaderRouterId::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "detached-role-count", 0, UINT16_MAX, Attributes::DetachedRoleCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "child-role-count", 0, UINT16_MAX, Attributes::ChildRoleCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "router-role-count", 0, UINT16_MAX, Attributes::RouterRoleCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "leader-role-count", 0, UINT16_MAX, Attributes::LeaderRoleCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "attach-attempt-count", 0, UINT16_MAX, Attributes::AttachAttemptCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "partition-id-change-count", 0, UINT16_MAX, - Attributes::PartitionIdChangeCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "better-partition-attach-attempt-count", 0, UINT16_MAX, - Attributes::BetterPartitionAttachAttemptCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "parent-change-count", 0, UINT16_MAX, Attributes::ParentChangeCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-total-count", 0, UINT32_MAX, Attributes::TxTotalCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-unicast-count", 0, UINT32_MAX, Attributes::TxUnicastCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-broadcast-count", 0, UINT32_MAX, Attributes::TxBroadcastCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-ack-requested-count", 0, UINT32_MAX, Attributes::TxAckRequestedCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-acked-count", 0, UINT32_MAX, Attributes::TxAckedCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-no-ack-requested-count", 0, UINT32_MAX, Attributes::TxNoAckRequestedCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-data-count", 0, UINT32_MAX, Attributes::TxDataCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-data-poll-count", 0, UINT32_MAX, Attributes::TxDataPollCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-beacon-count", 0, UINT32_MAX, Attributes::TxBeaconCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-beacon-request-count", 0, UINT32_MAX, Attributes::TxBeaconRequestCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-other-count", 0, UINT32_MAX, Attributes::TxOtherCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-retry-count", 0, UINT32_MAX, Attributes::TxRetryCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-direct-max-retry-expiry-count", 0, UINT32_MAX, - Attributes::TxDirectMaxRetryExpiryCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "tx-indirect-max-retry-expiry-count", 0, UINT32_MAX, - Attributes::TxIndirectMaxRetryExpiryCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "tx-err-cca-count", 0, UINT32_MAX, Attributes::TxErrCcaCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-err-abort-count", 0, UINT32_MAX, Attributes::TxErrAbortCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-err-busy-channel-count", 0, UINT32_MAX, Attributes::TxErrBusyChannelCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-total-count", 0, UINT32_MAX, Attributes::RxTotalCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-unicast-count", 0, UINT32_MAX, Attributes::RxUnicastCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-broadcast-count", 0, UINT32_MAX, Attributes::RxBroadcastCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-data-count", 0, UINT32_MAX, Attributes::RxDataCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-data-poll-count", 0, UINT32_MAX, Attributes::RxDataPollCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-beacon-count", 0, UINT32_MAX, Attributes::RxBeaconCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-beacon-request-count", 0, UINT32_MAX, Attributes::RxBeaconRequestCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-other-count", 0, UINT32_MAX, Attributes::RxOtherCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-address-filtered-count", 0, UINT32_MAX, - Attributes::RxAddressFilteredCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rx-dest-addr-filtered-count", 0, UINT32_MAX, - Attributes::RxDestAddrFilteredCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rx-duplicated-count", 0, UINT32_MAX, Attributes::RxDuplicatedCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-err-no-frame-count", 0, UINT32_MAX, Attributes::RxErrNoFrameCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-err-unknown-neighbor-count", 0, UINT32_MAX, - Attributes::RxErrUnknownNeighborCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rx-err-invalid-src-addr-count", 0, UINT32_MAX, - Attributes::RxErrInvalidSrcAddrCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rx-err-sec-count", 0, UINT32_MAX, Attributes::RxErrSecCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-err-fcs-count", 0, UINT32_MAX, Attributes::RxErrFcsCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "utctime", Attributes::UTCTime::Id, credsIssuerConfig), // + make_unique(Id, "granularity", Attributes::Granularity::Id, credsIssuerConfig), // + make_unique(Id, "time-source", Attributes::TimeSource::Id, credsIssuerConfig), // + make_unique(Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, credsIssuerConfig), // + make_unique(Id, "default-ntp", Attributes::DefaultNTP::Id, credsIssuerConfig), // + make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // + make_unique(Id, "dstoffset", Attributes::DSTOffset::Id, credsIssuerConfig), // + make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-database", Attributes::TimeZoneDatabase::Id, credsIssuerConfig), // + make_unique(Id, "ntpserver-available", Attributes::NTPServerAvailable::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-list-max-size", Attributes::TimeZoneListMaxSize::Id, credsIssuerConfig), // + make_unique(Id, "dstoffset-list-max-size", Attributes::DSTOffsetListMaxSize::Id, credsIssuerConfig), // + make_unique(Id, "supports-dnsresolve", Attributes::SupportsDNSResolve::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "dsttable-empty", Events::DSTTableEmpty::Id, credsIssuerConfig), // + make_unique(Id, "dststatus", Events::DSTStatus::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-status", Events::TimeZoneStatus::Id, credsIssuerConfig), // + make_unique(Id, "time-failure", Events::TimeFailure::Id, credsIssuerConfig), // + make_unique(Id, "missing-trusted-time-source", Events::MissingTrustedTimeSource::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "dsttable-empty", Events::DSTTableEmpty::Id, credsIssuerConfig), // + make_unique(Id, "dststatus", Events::DSTStatus::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-status", Events::TimeZoneStatus::Id, credsIssuerConfig), // + make_unique(Id, "time-failure", Events::TimeFailure::Id, credsIssuerConfig), // + make_unique(Id, "missing-trusted-time-source", Events::MissingTrustedTimeSource::Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} +void registerClusterBridgedDeviceBasicInformation(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::BridgedDeviceBasicInformation; + + const char * clusterName = "BridgedDeviceBasicInformation"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // + make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // + make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // + make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // + make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // + make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // + make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // + make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // + make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // + make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // + make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "vendor-name", Attributes::VendorName::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "vendor-id", 0, UINT16_MAX, Attributes::VendorID::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "product-name", Attributes::ProductName::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "node-label", Attributes::NodeLabel::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "hardware-version", 0, UINT16_MAX, Attributes::HardwareVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-err-other-count", 0, UINT32_MAX, Attributes::RxErrOtherCount::Id, + make_unique>(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "software-version", 0, UINT32_MAX, Attributes::SoftwareVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "active-timestamp", 0, UINT64_MAX, - Attributes::ActiveTimestamp::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "pending-timestamp", 0, UINT64_MAX, - Attributes::PendingTimestamp::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "delay", 0, UINT32_MAX, Attributes::Delay::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "security-policy", Attributes::SecurityPolicy::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + make_unique>(Id, "software-version-string", Attributes::SoftwareVersionString::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "part-number", Attributes::PartNumber::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "product-url", Attributes::ProductURL::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "product-label", Attributes::ProductLabel::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "serial-number", Attributes::SerialNumber::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "reachable", 0, 1, Attributes::Reachable::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "unique-id", Attributes::UniqueID::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>( + Id, "product-appearance", Attributes::ProductAppearance::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12890,83 +13846,95 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands, CredentialIssu make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "channel", Attributes::Channel::Id, credsIssuerConfig), // - make_unique(Id, "routing-role", Attributes::RoutingRole::Id, credsIssuerConfig), // - make_unique(Id, "network-name", Attributes::NetworkName::Id, credsIssuerConfig), // - make_unique(Id, "pan-id", Attributes::PanId::Id, credsIssuerConfig), // - make_unique(Id, "extended-pan-id", Attributes::ExtendedPanId::Id, credsIssuerConfig), // - make_unique(Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // - make_unique(Id, "neighbor-table", Attributes::NeighborTable::Id, credsIssuerConfig), // - make_unique(Id, "route-table", Attributes::RouteTable::Id, credsIssuerConfig), // - make_unique(Id, "partition-id", Attributes::PartitionId::Id, credsIssuerConfig), // - make_unique(Id, "weighting", Attributes::Weighting::Id, credsIssuerConfig), // - make_unique(Id, "data-version", Attributes::DataVersion::Id, credsIssuerConfig), // - make_unique(Id, "stable-data-version", Attributes::StableDataVersion::Id, credsIssuerConfig), // - make_unique(Id, "leader-router-id", Attributes::LeaderRouterId::Id, credsIssuerConfig), // - make_unique(Id, "detached-role-count", Attributes::DetachedRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "child-role-count", Attributes::ChildRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "router-role-count", Attributes::RouterRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "leader-role-count", Attributes::LeaderRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "attach-attempt-count", Attributes::AttachAttemptCount::Id, credsIssuerConfig), // - make_unique(Id, "partition-id-change-count", Attributes::PartitionIdChangeCount::Id, - credsIssuerConfig), // - make_unique(Id, "better-partition-attach-attempt-count", - Attributes::BetterPartitionAttachAttemptCount::Id, credsIssuerConfig), // - make_unique(Id, "parent-change-count", Attributes::ParentChangeCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-total-count", Attributes::TxTotalCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-unicast-count", Attributes::TxUnicastCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-broadcast-count", Attributes::TxBroadcastCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-ack-requested-count", Attributes::TxAckRequestedCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-acked-count", Attributes::TxAckedCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-no-ack-requested-count", Attributes::TxNoAckRequestedCount::Id, - credsIssuerConfig), // - make_unique(Id, "tx-data-count", Attributes::TxDataCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-data-poll-count", Attributes::TxDataPollCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-beacon-count", Attributes::TxBeaconCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-beacon-request-count", Attributes::TxBeaconRequestCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-other-count", Attributes::TxOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-retry-count", Attributes::TxRetryCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-direct-max-retry-expiry-count", Attributes::TxDirectMaxRetryExpiryCount::Id, - credsIssuerConfig), // - make_unique(Id, "tx-indirect-max-retry-expiry-count", Attributes::TxIndirectMaxRetryExpiryCount::Id, - credsIssuerConfig), // - make_unique(Id, "tx-err-cca-count", Attributes::TxErrCcaCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-abort-count", Attributes::TxErrAbortCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-busy-channel-count", Attributes::TxErrBusyChannelCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-total-count", Attributes::RxTotalCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-unicast-count", Attributes::RxUnicastCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-broadcast-count", Attributes::RxBroadcastCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-data-count", Attributes::RxDataCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-data-poll-count", Attributes::RxDataPollCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-beacon-count", Attributes::RxBeaconCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-beacon-request-count", Attributes::RxBeaconRequestCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-other-count", Attributes::RxOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-address-filtered-count", Attributes::RxAddressFilteredCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-dest-addr-filtered-count", Attributes::RxDestAddrFilteredCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-duplicated-count", Attributes::RxDuplicatedCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-no-frame-count", Attributes::RxErrNoFrameCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-unknown-neighbor-count", Attributes::RxErrUnknownNeighborCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-err-invalid-src-addr-count", Attributes::RxErrInvalidSrcAddrCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-err-sec-count", Attributes::RxErrSecCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-fcs-count", Attributes::RxErrFcsCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-other-count", Attributes::RxErrOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "active-timestamp", Attributes::ActiveTimestamp::Id, credsIssuerConfig), // - make_unique(Id, "pending-timestamp", Attributes::PendingTimestamp::Id, credsIssuerConfig), // - make_unique(Id, "delay", Attributes::Delay::Id, credsIssuerConfig), // - make_unique(Id, "security-policy", Attributes::SecurityPolicy::Id, credsIssuerConfig), // - make_unique(Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, credsIssuerConfig), // - make_unique(Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, - credsIssuerConfig), // - make_unique(Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::Id, - credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // + make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // + make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // + make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // + make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // + make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // + make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // + make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // + make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // + make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // + make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // + make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // + make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // + make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // + make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // + make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // + make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} +void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::Switch; + + const char * clusterName = "Switch"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "number-of-positions", Attributes::NumberOfPositions::Id, credsIssuerConfig), // + make_unique(Id, "current-position", Attributes::CurrentPosition::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-max", Attributes::MultiPressMax::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "number-of-positions", 0, UINT8_MAX, Attributes::NumberOfPositions::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-position", 0, UINT8_MAX, Attributes::CurrentPosition::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "multi-press-max", 0, UINT8_MAX, Attributes::MultiPressMax::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "number-of-positions", Attributes::NumberOfPositions::Id, credsIssuerConfig), // + make_unique(Id, "current-position", Attributes::CurrentPosition::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-max", Attributes::MultiPressMax::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12977,85 +13945,61 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands, CredentialIssu // Events // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // - make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "switch-latched", Events::SwitchLatched::Id, credsIssuerConfig), // + make_unique(Id, "initial-press", Events::InitialPress::Id, credsIssuerConfig), // + make_unique(Id, "long-press", Events::LongPress::Id, credsIssuerConfig), // + make_unique(Id, "short-release", Events::ShortRelease::Id, credsIssuerConfig), // + make_unique(Id, "long-release", Events::LongRelease::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-ongoing", Events::MultiPressOngoing::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-complete", Events::MultiPressComplete::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // - make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "switch-latched", Events::SwitchLatched::Id, credsIssuerConfig), // + make_unique(Id, "initial-press", Events::InitialPress::Id, credsIssuerConfig), // + make_unique(Id, "long-press", Events::LongPress::Id, credsIssuerConfig), // + make_unique(Id, "short-release", Events::ShortRelease::Id, credsIssuerConfig), // + make_unique(Id, "long-release", Events::LongRelease::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-ongoing", Events::MultiPressOngoing::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-complete", Events::MultiPressComplete::Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterWiFiNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterAdministratorCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::WiFiNetworkDiagnostics; + using namespace chip::app::Clusters::AdministratorCommissioning; - const char * clusterName = "WiFiNetworkDiagnostics"; + const char * clusterName = "AdministratorCommissioning"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "bssid", Attributes::Bssid::Id, credsIssuerConfig), // - make_unique(Id, "security-type", Attributes::SecurityType::Id, credsIssuerConfig), // - make_unique(Id, "wi-fi-version", Attributes::WiFiVersion::Id, credsIssuerConfig), // - make_unique(Id, "channel-number", Attributes::ChannelNumber::Id, credsIssuerConfig), // - make_unique(Id, "rssi", Attributes::Rssi::Id, credsIssuerConfig), // - make_unique(Id, "beacon-lost-count", Attributes::BeaconLostCount::Id, credsIssuerConfig), // - make_unique(Id, "beacon-rx-count", Attributes::BeaconRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-multicast-rx-count", Attributes::PacketMulticastRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-multicast-tx-count", Attributes::PacketMulticastTxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-unicast-rx-count", Attributes::PacketUnicastRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-unicast-tx-count", Attributes::PacketUnicastTxCount::Id, credsIssuerConfig), // - make_unique(Id, "current-max-rate", Attributes::CurrentMaxRate::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "bssid", Attributes::Bssid::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "security-type", 0, UINT8_MAX, Attributes::SecurityType::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "wi-fi-version", 0, UINT8_MAX, Attributes::WiFiVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "channel-number", 0, UINT16_MAX, - Attributes::ChannelNumber::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "rssi", INT8_MIN, INT8_MAX, Attributes::Rssi::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "beacon-lost-count", 0, UINT32_MAX, - Attributes::BeaconLostCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "beacon-rx-count", 0, UINT32_MAX, - Attributes::BeaconRxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "packet-multicast-rx-count", 0, UINT32_MAX, - Attributes::PacketMulticastRxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "packet-multicast-tx-count", 0, UINT32_MAX, - Attributes::PacketMulticastTxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "packet-unicast-rx-count", 0, UINT32_MAX, - Attributes::PacketUnicastRxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "packet-unicast-tx-count", 0, UINT32_MAX, - Attributes::PacketUnicastTxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "current-max-rate", 0, UINT64_MAX, - Attributes::CurrentMaxRate::Id, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "window-status", Attributes::WindowStatus::Id, credsIssuerConfig), // + make_unique(Id, "admin-fabric-index", Attributes::AdminFabricIndex::Id, credsIssuerConfig), // + make_unique(Id, "admin-vendor-id", Attributes::AdminVendorId::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "window-status", 0, UINT8_MAX, Attributes::WindowStatus::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "admin-fabric-index", 0, UINT8_MAX, Attributes::AdminFabricIndex::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>(Id, "admin-vendor-id", 0, UINT16_MAX, + Attributes::AdminVendorId::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13068,94 +14012,77 @@ void registerClusterWiFiNetworkDiagnostics(Commands & commands, CredentialIssuer make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "bssid", Attributes::Bssid::Id, credsIssuerConfig), // - make_unique(Id, "security-type", Attributes::SecurityType::Id, credsIssuerConfig), // - make_unique(Id, "wi-fi-version", Attributes::WiFiVersion::Id, credsIssuerConfig), // - make_unique(Id, "channel-number", Attributes::ChannelNumber::Id, credsIssuerConfig), // - make_unique(Id, "rssi", Attributes::Rssi::Id, credsIssuerConfig), // - make_unique(Id, "beacon-lost-count", Attributes::BeaconLostCount::Id, credsIssuerConfig), // - make_unique(Id, "beacon-rx-count", Attributes::BeaconRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-multicast-rx-count", Attributes::PacketMulticastRxCount::Id, - credsIssuerConfig), // - make_unique(Id, "packet-multicast-tx-count", Attributes::PacketMulticastTxCount::Id, - credsIssuerConfig), // - make_unique(Id, "packet-unicast-rx-count", Attributes::PacketUnicastRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-unicast-tx-count", Attributes::PacketUnicastTxCount::Id, credsIssuerConfig), // - make_unique(Id, "current-max-rate", Attributes::CurrentMaxRate::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "window-status", Attributes::WindowStatus::Id, credsIssuerConfig), // + make_unique(Id, "admin-fabric-index", Attributes::AdminFabricIndex::Id, credsIssuerConfig), // + make_unique(Id, "admin-vendor-id", Attributes::AdminVendorId::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "disconnection", Events::Disconnection::Id, credsIssuerConfig), // - make_unique(Id, "association-failure", Events::AssociationFailure::Id, credsIssuerConfig), // - make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "disconnection", Events::Disconnection::Id, credsIssuerConfig), // - make_unique(Id, "association-failure", Events::AssociationFailure::Id, credsIssuerConfig), // - make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterEthernetNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterOperationalCredentials(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::EthernetNetworkDiagnostics; + using namespace chip::app::Clusters::OperationalCredentials; - const char * clusterName = "EthernetNetworkDiagnostics"; + const char * clusterName = "OperationalCredentials"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "phyrate", Attributes::PHYRate::Id, credsIssuerConfig), // - make_unique(Id, "full-duplex", Attributes::FullDuplex::Id, credsIssuerConfig), // - make_unique(Id, "packet-rx-count", Attributes::PacketRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-tx-count", Attributes::PacketTxCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-count", Attributes::TxErrCount::Id, credsIssuerConfig), // - make_unique(Id, "collision-count", Attributes::CollisionCount::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // - make_unique(Id, "carrier-detect", Attributes::CarrierDetect::Id, credsIssuerConfig), // - make_unique(Id, "time-since-reset", Attributes::TimeSinceReset::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "phyrate", 0, UINT8_MAX, Attributes::PHYRate::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "full-duplex", 0, 1, Attributes::FullDuplex::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "packet-rx-count", 0, UINT64_MAX, Attributes::PacketRxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "packet-tx-count", 0, UINT64_MAX, Attributes::PacketTxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-err-count", 0, UINT64_MAX, Attributes::TxErrCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "collision-count", 0, UINT64_MAX, Attributes::CollisionCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "carrier-detect", 0, 1, Attributes::CarrierDetect::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "time-since-reset", 0, UINT64_MAX, Attributes::TimeSinceReset::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "nocs", Attributes::NOCs::Id, credsIssuerConfig), // + make_unique(Id, "fabrics", Attributes::Fabrics::Id, credsIssuerConfig), // + make_unique(Id, "supported-fabrics", Attributes::SupportedFabrics::Id, credsIssuerConfig), // + make_unique(Id, "commissioned-fabrics", Attributes::CommissionedFabrics::Id, credsIssuerConfig), // + make_unique(Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, credsIssuerConfig), // + make_unique(Id, "current-fabric-index", Attributes::CurrentFabricIndex::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "nocs", Attributes::NOCs::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "fabrics", Attributes::Fabrics::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "supported-fabrics", 0, UINT8_MAX, Attributes::SupportedFabrics::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "commissioned-fabrics", 0, UINT8_MAX, Attributes::CommissionedFabrics::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "current-fabric-index", 0, UINT8_MAX, Attributes::CurrentFabricIndex::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13168,17 +14095,15 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands, CredentialIs make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "phyrate", Attributes::PHYRate::Id, credsIssuerConfig), // - make_unique(Id, "full-duplex", Attributes::FullDuplex::Id, credsIssuerConfig), // - make_unique(Id, "packet-rx-count", Attributes::PacketRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-tx-count", Attributes::PacketTxCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-count", Attributes::TxErrCount::Id, credsIssuerConfig), // - make_unique(Id, "collision-count", Attributes::CollisionCount::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // - make_unique(Id, "carrier-detect", Attributes::CarrierDetect::Id, credsIssuerConfig), // - make_unique(Id, "time-since-reset", Attributes::TimeSinceReset::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "nocs", Attributes::NOCs::Id, credsIssuerConfig), // + make_unique(Id, "fabrics", Attributes::Fabrics::Id, credsIssuerConfig), // + make_unique(Id, "supported-fabrics", Attributes::SupportedFabrics::Id, credsIssuerConfig), // + make_unique(Id, "commissioned-fabrics", Attributes::CommissionedFabrics::Id, credsIssuerConfig), // + make_unique(Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, + credsIssuerConfig), // + make_unique(Id, "current-fabric-index", Attributes::CurrentFabricIndex::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13194,76 +14119,46 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands, CredentialIs commands.Register(clusterName, clusterCommands); } -void registerClusterTimeSynchronization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterGroupKeyManagement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::TimeSynchronization; + using namespace chip::app::Clusters::GroupKeyManagement; - const char * clusterName = "TimeSynchronization"; + const char * clusterName = "GroupKeyManagement"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "utctime", Attributes::UTCTime::Id, credsIssuerConfig), // - make_unique(Id, "granularity", Attributes::Granularity::Id, credsIssuerConfig), // - make_unique(Id, "time-source", Attributes::TimeSource::Id, credsIssuerConfig), // - make_unique(Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, credsIssuerConfig), // - make_unique(Id, "default-ntp", Attributes::DefaultNTP::Id, credsIssuerConfig), // - make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // - make_unique(Id, "dstoffset", Attributes::DSTOffset::Id, credsIssuerConfig), // - make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-database", Attributes::TimeZoneDatabase::Id, credsIssuerConfig), // - make_unique(Id, "ntpserver-available", Attributes::NTPServerAvailable::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-list-max-size", Attributes::TimeZoneListMaxSize::Id, credsIssuerConfig), // - make_unique(Id, "dstoffset-list-max-size", Attributes::DSTOffsetListMaxSize::Id, credsIssuerConfig), // - make_unique(Id, "supports-dnsresolve", Attributes::SupportsDNSResolve::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>(Id, "utctime", 0, UINT64_MAX, Attributes::UTCTime::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "granularity", 0, UINT8_MAX, Attributes::Granularity::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "time-source", 0, UINT8_MAX, Attributes::TimeSource::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "default-ntp", Attributes::DefaultNTP::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "group-key-map", Attributes::GroupKeyMap::Id, credsIssuerConfig), // + make_unique(Id, "group-table", Attributes::GroupTable::Id, credsIssuerConfig), // + make_unique(Id, "max-groups-per-fabric", Attributes::MaxGroupsPerFabric::Id, credsIssuerConfig), // + make_unique(Id, "max-group-keys-per-fabric", Attributes::MaxGroupKeysPerFabric::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique>>( - Id, "time-zone", Attributes::TimeZone::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + chip::app::DataModel::List>>( + Id, "group-key-map", Attributes::GroupKeyMap::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( - Id, "dstoffset", Attributes::DSTOffset::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "local-time", 0, UINT64_MAX, Attributes::LocalTime::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "time-zone-database", 0, UINT8_MAX, Attributes::TimeZoneDatabase::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "ntpserver-available", 0, 1, Attributes::NTPServerAvailable::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "time-zone-list-max-size", 0, UINT8_MAX, Attributes::TimeZoneListMaxSize::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dstoffset-list-max-size", 0, UINT8_MAX, Attributes::DSTOffsetListMaxSize::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "supports-dnsresolve", 0, 1, Attributes::SupportsDNSResolve::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + chip::app::DataModel::List>>( + Id, "group-table", Attributes::GroupTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "max-groups-per-fabric", 0, UINT16_MAX, Attributes::MaxGroupsPerFabric::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "max-group-keys-per-fabric", 0, UINT16_MAX, Attributes::MaxGroupKeysPerFabric::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13276,51 +14171,33 @@ void registerClusterTimeSynchronization(Commands & commands, CredentialIssuerCom make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "utctime", Attributes::UTCTime::Id, credsIssuerConfig), // - make_unique(Id, "granularity", Attributes::Granularity::Id, credsIssuerConfig), // - make_unique(Id, "time-source", Attributes::TimeSource::Id, credsIssuerConfig), // - make_unique(Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, credsIssuerConfig), // - make_unique(Id, "default-ntp", Attributes::DefaultNTP::Id, credsIssuerConfig), // - make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // - make_unique(Id, "dstoffset", Attributes::DSTOffset::Id, credsIssuerConfig), // - make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-database", Attributes::TimeZoneDatabase::Id, credsIssuerConfig), // - make_unique(Id, "ntpserver-available", Attributes::NTPServerAvailable::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-list-max-size", Attributes::TimeZoneListMaxSize::Id, credsIssuerConfig), // - make_unique(Id, "dstoffset-list-max-size", Attributes::DSTOffsetListMaxSize::Id, credsIssuerConfig), // - make_unique(Id, "supports-dnsresolve", Attributes::SupportsDNSResolve::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "group-key-map", Attributes::GroupKeyMap::Id, credsIssuerConfig), // + make_unique(Id, "group-table", Attributes::GroupTable::Id, credsIssuerConfig), // + make_unique(Id, "max-groups-per-fabric", Attributes::MaxGroupsPerFabric::Id, credsIssuerConfig), // + make_unique(Id, "max-group-keys-per-fabric", Attributes::MaxGroupKeysPerFabric::Id, + credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "dsttable-empty", Events::DSTTableEmpty::Id, credsIssuerConfig), // - make_unique(Id, "dststatus", Events::DSTStatus::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-status", Events::TimeZoneStatus::Id, credsIssuerConfig), // - make_unique(Id, "time-failure", Events::TimeFailure::Id, credsIssuerConfig), // - make_unique(Id, "missing-trusted-time-source", Events::MissingTrustedTimeSource::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "dsttable-empty", Events::DSTTableEmpty::Id, credsIssuerConfig), // - make_unique(Id, "dststatus", Events::DSTStatus::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-status", Events::TimeZoneStatus::Id, credsIssuerConfig), // - make_unique(Id, "time-failure", Events::TimeFailure::Id, credsIssuerConfig), // - make_unique(Id, "missing-trusted-time-source", Events::MissingTrustedTimeSource::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterBridgedDeviceBasicInformation(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::BridgedDeviceBasicInformation; + using namespace chip::app::Clusters::FixedLabel; - const char * clusterName = "BridgedDeviceBasicInformation"; + const char * clusterName = "FixedLabel"; commands_list clusterCommands = { // @@ -13330,63 +14207,18 @@ void registerClusterBridgedDeviceBasicInformation(Commands & commands, Credentia // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // - make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // - make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // - make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // - make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // - make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // - make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // - make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // - make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // - make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // - make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "vendor-name", Attributes::VendorName::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "vendor-id", 0, UINT16_MAX, Attributes::VendorID::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "product-name", Attributes::ProductName::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "node-label", Attributes::NodeLabel::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "hardware-version", 0, UINT16_MAX, Attributes::HardwareVersion::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "software-version", 0, UINT32_MAX, Attributes::SoftwareVersion::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "software-version-string", Attributes::SoftwareVersionString::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "part-number", Attributes::PartNumber::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "product-url", Attributes::ProductURL::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "product-label", Attributes::ProductLabel::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "serial-number", Attributes::SerialNumber::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "reachable", 0, 1, Attributes::Reachable::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "unique-id", Attributes::UniqueID::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique< - WriteAttributeAsComplex>( - Id, "product-appearance", Attributes::ProductAppearance::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + WriteAttributeAsComplex>>( + Id, "label-list", Attributes::LabelList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13399,52 +14231,29 @@ void registerClusterBridgedDeviceBasicInformation(Commands & commands, Credentia make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // - make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // - make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // - make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // - make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // - make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // - make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // - make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // - make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // - make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // - make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // - make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // - make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // - make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // - make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // - make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // - make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterUserLabel(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::Switch; + using namespace chip::app::Clusters::UserLabel; - const char * clusterName = "Switch"; + const char * clusterName = "UserLabel"; commands_list clusterCommands = { // @@ -13455,9 +14264,7 @@ void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * creds // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "number-of-positions", Attributes::NumberOfPositions::Id, credsIssuerConfig), // - make_unique(Id, "current-position", Attributes::CurrentPosition::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-max", Attributes::MultiPressMax::Id, credsIssuerConfig), // + make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13465,12 +14272,9 @@ void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * creds make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "number-of-positions", 0, UINT8_MAX, Attributes::NumberOfPositions::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-position", 0, UINT8_MAX, Attributes::CurrentPosition::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "multi-press-max", 0, UINT8_MAX, Attributes::MultiPressMax::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "label-list", Attributes::LabelList::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13485,9 +14289,7 @@ void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * creds make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "number-of-positions", Attributes::NumberOfPositions::Id, credsIssuerConfig), // - make_unique(Id, "current-position", Attributes::CurrentPosition::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-max", Attributes::MultiPressMax::Id, credsIssuerConfig), // + make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13497,47 +14299,27 @@ void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * creds // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "switch-latched", Events::SwitchLatched::Id, credsIssuerConfig), // - make_unique(Id, "initial-press", Events::InitialPress::Id, credsIssuerConfig), // - make_unique(Id, "long-press", Events::LongPress::Id, credsIssuerConfig), // - make_unique(Id, "short-release", Events::ShortRelease::Id, credsIssuerConfig), // - make_unique(Id, "long-release", Events::LongRelease::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-ongoing", Events::MultiPressOngoing::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-complete", Events::MultiPressComplete::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "switch-latched", Events::SwitchLatched::Id, credsIssuerConfig), // - make_unique(Id, "initial-press", Events::InitialPress::Id, credsIssuerConfig), // - make_unique(Id, "long-press", Events::LongPress::Id, credsIssuerConfig), // - make_unique(Id, "short-release", Events::ShortRelease::Id, credsIssuerConfig), // - make_unique(Id, "long-release", Events::LongRelease::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-ongoing", Events::MultiPressOngoing::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-complete", Events::MultiPressComplete::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterAdministratorCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterProxyConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::AdministratorCommissioning; + using namespace chip::app::Clusters::ProxyConfiguration; - const char * clusterName = "AdministratorCommissioning"; + const char * clusterName = "ProxyConfiguration"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "window-status", Attributes::WindowStatus::Id, credsIssuerConfig), // - make_unique(Id, "admin-fabric-index", Attributes::AdminFabricIndex::Id, credsIssuerConfig), // - make_unique(Id, "admin-vendor-id", Attributes::AdminVendorId::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13545,14 +14327,6 @@ void registerClusterAdministratorCommissioning(Commands & commands, CredentialIs make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>( - Id, "window-status", 0, UINT8_MAX, Attributes::WindowStatus::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "admin-fabric-index", 0, UINT8_MAX, Attributes::AdminFabricIndex::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>(Id, "admin-vendor-id", 0, UINT16_MAX, - Attributes::AdminVendorId::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13567,9 +14341,6 @@ void registerClusterAdministratorCommissioning(Commands & commands, CredentialIs make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "window-status", Attributes::WindowStatus::Id, credsIssuerConfig), // - make_unique(Id, "admin-fabric-index", Attributes::AdminFabricIndex::Id, credsIssuerConfig), // - make_unique(Id, "admin-vendor-id", Attributes::AdminVendorId::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13585,57 +14356,28 @@ void registerClusterAdministratorCommissioning(Commands & commands, CredentialIs commands.Register(clusterName, clusterCommands); } -void registerClusterOperationalCredentials(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterProxyDiscovery(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::OperationalCredentials; + using namespace chip::app::Clusters::ProxyDiscovery; - const char * clusterName = "OperationalCredentials"; + const char * clusterName = "ProxyDiscovery"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "nocs", Attributes::NOCs::Id, credsIssuerConfig), // - make_unique(Id, "fabrics", Attributes::Fabrics::Id, credsIssuerConfig), // - make_unique(Id, "supported-fabrics", Attributes::SupportedFabrics::Id, credsIssuerConfig), // - make_unique(Id, "commissioned-fabrics", Attributes::CommissionedFabrics::Id, credsIssuerConfig), // - make_unique(Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, credsIssuerConfig), // - make_unique(Id, "current-fabric-index", Attributes::CurrentFabricIndex::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "nocs", Attributes::NOCs::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "fabrics", Attributes::Fabrics::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "supported-fabrics", 0, UINT8_MAX, Attributes::SupportedFabrics::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "commissioned-fabrics", 0, UINT8_MAX, Attributes::CommissionedFabrics::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "current-fabric-index", 0, UINT8_MAX, Attributes::CurrentFabricIndex::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13648,15 +14390,8 @@ void registerClusterOperationalCredentials(Commands & commands, CredentialIssuer make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "nocs", Attributes::NOCs::Id, credsIssuerConfig), // - make_unique(Id, "fabrics", Attributes::Fabrics::Id, credsIssuerConfig), // - make_unique(Id, "supported-fabrics", Attributes::SupportedFabrics::Id, credsIssuerConfig), // - make_unique(Id, "commissioned-fabrics", Attributes::CommissionedFabrics::Id, credsIssuerConfig), // - make_unique(Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, - credsIssuerConfig), // - make_unique(Id, "current-fabric-index", Attributes::CurrentFabricIndex::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13672,46 +14407,28 @@ void registerClusterOperationalCredentials(Commands & commands, CredentialIssuer commands.Register(clusterName, clusterCommands); } -void registerClusterGroupKeyManagement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterProxyValid(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::GroupKeyManagement; + using namespace chip::app::Clusters::ProxyValid; - const char * clusterName = "GroupKeyManagement"; + const char * clusterName = "ProxyValid"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "group-key-map", Attributes::GroupKeyMap::Id, credsIssuerConfig), // - make_unique(Id, "group-table", Attributes::GroupTable::Id, credsIssuerConfig), // - make_unique(Id, "max-groups-per-fabric", Attributes::MaxGroupsPerFabric::Id, credsIssuerConfig), // - make_unique(Id, "max-group-keys-per-fabric", Attributes::MaxGroupKeysPerFabric::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "group-key-map", Attributes::GroupKeyMap::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( - Id, "group-table", Attributes::GroupTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "max-groups-per-fabric", 0, UINT16_MAX, Attributes::MaxGroupsPerFabric::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "max-group-keys-per-fabric", 0, UINT16_MAX, Attributes::MaxGroupKeysPerFabric::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13724,13 +14441,8 @@ void registerClusterGroupKeyManagement(Commands & commands, CredentialIssuerComm make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "group-key-map", Attributes::GroupKeyMap::Id, credsIssuerConfig), // - make_unique(Id, "group-table", Attributes::GroupTable::Id, credsIssuerConfig), // - make_unique(Id, "max-groups-per-fabric", Attributes::MaxGroupsPerFabric::Id, credsIssuerConfig), // - make_unique(Id, "max-group-keys-per-fabric", Attributes::MaxGroupKeysPerFabric::Id, - credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13746,11 +14458,11 @@ void registerClusterGroupKeyManagement(Commands & commands, CredentialIssuerComm commands.Register(clusterName, clusterCommands); } -void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::FixedLabel; + using namespace chip::app::Clusters::BooleanState; - const char * clusterName = "FixedLabel"; + const char * clusterName = "BooleanState"; commands_list clusterCommands = { // @@ -13761,7 +14473,7 @@ void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * c // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // + make_unique(Id, "state-value", Attributes::StateValue::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13769,9 +14481,8 @@ void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "label-list", Attributes::LabelList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "state-value", 0, 1, Attributes::StateValue::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13786,7 +14497,7 @@ void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * c make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // + make_unique(Id, "state-value", Attributes::StateValue::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13796,28 +14507,39 @@ void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * c // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-change", Events::StateChange::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-change", Events::StateChange::Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterUserLabel(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::UserLabel; + using namespace chip::app::Clusters::IcdManagement; - const char * clusterName = "UserLabel"; + const char * clusterName = "IcdManagement"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "idle-mode-interval", Attributes::IdleModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // + make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // + make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // + make_unique(Id, "clients-supported-per-fabric", Attributes::ClientsSupportedPerFabric::Id, + credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13825,9 +14547,20 @@ void registerClusterUserLabel(Commands & commands, CredentialIssuerCommands * cr make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "label-list", Attributes::LabelList::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "idle-mode-interval", 0, UINT32_MAX, Attributes::IdleModeInterval::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "active-mode-interval", 0, UINT32_MAX, Attributes::ActiveModeInterval::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "active-mode-threshold", 0, UINT16_MAX, Attributes::ActiveModeThreshold::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "registered-clients", Attributes::RegisteredClients::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "icdcounter", 0, UINT32_MAX, Attributes::ICDCounter::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "clients-supported-per-fabric", 0, UINT16_MAX, + Attributes::ClientsSupportedPerFabric::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13840,9 +14573,15 @@ void registerClusterUserLabel(Commands & commands, CredentialIssuerCommands * cr make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "idle-mode-interval", Attributes::IdleModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // + make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // + make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // + make_unique(Id, "clients-supported-per-fabric", Attributes::ClientsSupportedPerFabric::Id, + credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13858,21 +14597,29 @@ void registerClusterUserLabel(Commands & commands, CredentialIssuerCommands * cr commands.Register(clusterName, clusterCommands); } -void registerClusterProxyConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::ProxyConfiguration; + using namespace chip::app::Clusters::ModeSelect; - const char * clusterName = "ProxyConfiguration"; + const char * clusterName = "ModeSelect"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "standard-namespace", Attributes::StandardNamespace::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13880,6 +14627,20 @@ void registerClusterProxyConfiguration(Commands & commands, CredentialIssuerComm make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>(Id, "standard-namespace", 0, UINT16_MAX, + Attributes::StandardNamespace::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13894,6 +14655,12 @@ void registerClusterProxyConfiguration(Commands & commands, CredentialIssuerComm make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "standard-namespace", Attributes::StandardNamespace::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13909,21 +14676,28 @@ void registerClusterProxyConfiguration(Commands & commands, CredentialIssuerComm commands.Register(clusterName, clusterCommands); } -void registerClusterProxyDiscovery(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterLaundryWasherModeSelect(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::ProxyDiscovery; + using namespace chip::app::Clusters::LaundryWasherModeSelect; - const char * clusterName = "ProxyDiscovery"; + const char * clusterName = "LaundryWasherModeSelect"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13931,6 +14705,17 @@ void registerClusterProxyDiscovery(Commands & commands, CredentialIssuerCommands make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13945,6 +14730,11 @@ void registerClusterProxyDiscovery(Commands & commands, CredentialIssuerCommands make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13960,21 +14750,29 @@ void registerClusterProxyDiscovery(Commands & commands, CredentialIssuerCommands commands.Register(clusterName, clusterCommands); } -void registerClusterProxyValid(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterRefrigeratorAndTemperatureControlledCabinetModeSelect(Commands & commands, + CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::ProxyValid; + using namespace chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect; - const char * clusterName = "ProxyValid"; + const char * clusterName = "RefrigeratorAndTemperatureControlledCabinetModeSelect"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13982,6 +14780,17 @@ void registerClusterProxyValid(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13996,6 +14805,11 @@ void registerClusterProxyValid(Commands & commands, CredentialIssuerCommands * c make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14011,11 +14825,11 @@ void registerClusterProxyValid(Commands & commands, CredentialIssuerCommands * c commands.Register(clusterName, clusterCommands); } -void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterWasherControls(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::BooleanState; + using namespace chip::app::Clusters::WasherControls; - const char * clusterName = "BooleanState"; + const char * clusterName = "WasherControls"; commands_list clusterCommands = { // @@ -14026,7 +14840,10 @@ void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-value", Attributes::StateValue::Id, credsIssuerConfig), // + make_unique(Id, "spin-speeds", Attributes::SpinSpeeds::Id, credsIssuerConfig), // + make_unique(Id, "spin-speed-current", Attributes::SpinSpeedCurrent::Id, credsIssuerConfig), // + make_unique(Id, "number-of-rinses", Attributes::NumberOfRinses::Id, credsIssuerConfig), // + make_unique(Id, "max-rinses", Attributes::MaxRinses::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14034,8 +14851,15 @@ void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "state-value", 0, 1, Attributes::StateValue::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + make_unique>>( + Id, "spin-speeds", Attributes::SpinSpeeds::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "spin-speed-current", 0, UINT8_MAX, + Attributes::SpinSpeedCurrent::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "number-of-rinses", 0, UINT8_MAX, Attributes::NumberOfRinses::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "max-rinses", 0, UINT8_MAX, Attributes::MaxRinses::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14050,7 +14874,10 @@ void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-value", Attributes::StateValue::Id, credsIssuerConfig), // + make_unique(Id, "spin-speeds", Attributes::SpinSpeeds::Id, credsIssuerConfig), // + make_unique(Id, "spin-speed-current", Attributes::SpinSpeedCurrent::Id, credsIssuerConfig), // + make_unique(Id, "number-of-rinses", Attributes::NumberOfRinses::Id, credsIssuerConfig), // + make_unique(Id, "max-rinses", Attributes::MaxRinses::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14060,39 +14887,34 @@ void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-change", Events::StateChange::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-change", Events::StateChange::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); } -void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterRvcRunModeSelect(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::IcdManagement; + using namespace chip::app::Clusters::RvcRunModeSelect; - const char * clusterName = "IcdManagement"; + const char * clusterName = "RvcRunModeSelect"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "idle-mode-interval", Attributes::IdleModeInterval::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // - make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // - make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // - make_unique(Id, "clients-supported-per-fabric", Attributes::ClientsSupportedPerFabric::Id, - credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14100,20 +14922,17 @@ void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "idle-mode-interval", 0, UINT32_MAX, Attributes::IdleModeInterval::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-mode-interval", 0, UINT32_MAX, Attributes::ActiveModeInterval::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-mode-threshold", 0, UINT16_MAX, Attributes::ActiveModeThreshold::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( - Id, "registered-clients", Attributes::RegisteredClients::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "icdcounter", 0, UINT32_MAX, Attributes::ICDCounter::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "clients-supported-per-fabric", 0, UINT16_MAX, - Attributes::ClientsSupportedPerFabric::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + chip::app::DataModel::List>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14126,15 +14945,13 @@ void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "idle-mode-interval", Attributes::IdleModeInterval::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // - make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // - make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // - make_unique(Id, "clients-supported-per-fabric", Attributes::ClientsSupportedPerFabric::Id, - credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14150,24 +14967,24 @@ void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands commands.Register(clusterName, clusterCommands); } -void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterRvcCleanModeSelect(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::ModeSelect; + using namespace chip::app::Clusters::RvcCleanModeSelect; - const char * clusterName = "ModeSelect"; + const char * clusterName = "RvcCleanModeSelect"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "standard-namespace", Attributes::StandardNamespace::Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // @@ -14181,11 +14998,8 @@ void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * c make_unique>(Id, credsIssuerConfig), // make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "standard-namespace", 0, UINT16_MAX, - Attributes::StandardNamespace::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( + chip::app::DataModel::List>>( Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14208,7 +15022,6 @@ void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * c WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "standard-namespace", Attributes::StandardNamespace::Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // @@ -14248,7 +15061,7 @@ void registerClusterTemperatureControl(Commands & commands, CredentialIssuerComm make_unique(Id, "min-temperature", Attributes::MinTemperature::Id, credsIssuerConfig), // make_unique(Id, "max-temperature", Attributes::MaxTemperature::Id, credsIssuerConfig), // make_unique(Id, "step", Attributes::Step::Id, credsIssuerConfig), // - make_unique(Id, "current-temperature-level-index", Attributes::CurrentTemperatureLevelIndex::Id, + make_unique(Id, "selected-temperature-level", Attributes::SelectedTemperatureLevel::Id, credsIssuerConfig), // make_unique(Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::Id, credsIssuerConfig), // @@ -14267,11 +15080,10 @@ void registerClusterTemperatureControl(Commands & commands, CredentialIssuerComm WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "step", INT16_MIN, INT16_MAX, Attributes::Step::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-temperature-level-index", 0, UINT8_MAX, - Attributes::CurrentTemperatureLevelIndex::Id, WriteCommandType::kForceWrite, + make_unique>(Id, "selected-temperature-level", 0, UINT8_MAX, + Attributes::SelectedTemperatureLevel::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( @@ -14292,7 +15104,7 @@ void registerClusterTemperatureControl(Commands & commands, CredentialIssuerComm make_unique(Id, "min-temperature", Attributes::MinTemperature::Id, credsIssuerConfig), // make_unique(Id, "max-temperature", Attributes::MaxTemperature::Id, credsIssuerConfig), // make_unique(Id, "step", Attributes::Step::Id, credsIssuerConfig), // - make_unique(Id, "current-temperature-level-index", Attributes::CurrentTemperatureLevelIndex::Id, + make_unique(Id, "selected-temperature-level", Attributes::SelectedTemperatureLevel::Id, credsIssuerConfig), // make_unique(Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::Id, credsIssuerConfig), // @@ -14321,14 +15133,12 @@ void registerClusterRefrigeratorAlarm(Commands & commands, CredentialIssuerComma // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // - make_unique(Id, "latch", Attributes::Latch::Id, credsIssuerConfig), // make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -14338,9 +15148,7 @@ void registerClusterRefrigeratorAlarm(Commands & commands, CredentialIssuerComma make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // make_unique>>( - Id, "mask", 0, UINT32_MAX, Attributes::Mask::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( - Id, "latch", 0, UINT32_MAX, Attributes::Latch::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + Id, "mask", 0, UINT32_MAX, Attributes::Mask::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "state", 0, UINT32_MAX, Attributes::State::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( @@ -14358,7 +15166,6 @@ void registerClusterRefrigeratorAlarm(Commands & commands, CredentialIssuerComma WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // - make_unique(Id, "latch", Attributes::Latch::Id, credsIssuerConfig), // make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -14377,6 +15184,80 @@ void registerClusterRefrigeratorAlarm(Commands & commands, CredentialIssuerComma commands.Register(clusterName, clusterCommands); } +void registerClusterDishwasherModeSelect(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::DishwasherModeSelect; + + const char * clusterName = "DishwasherModeSelect"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterAirQuality(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::AirQuality; @@ -23555,8 +24436,14 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterBooleanState(commands, credsIssuerConfig); registerClusterIcdManagement(commands, credsIssuerConfig); registerClusterModeSelect(commands, credsIssuerConfig); + registerClusterLaundryWasherModeSelect(commands, credsIssuerConfig); + registerClusterRefrigeratorAndTemperatureControlledCabinetModeSelect(commands, credsIssuerConfig); + registerClusterWasherControls(commands, credsIssuerConfig); + registerClusterRvcRunModeSelect(commands, credsIssuerConfig); + registerClusterRvcCleanModeSelect(commands, credsIssuerConfig); registerClusterTemperatureControl(commands, credsIssuerConfig); registerClusterRefrigeratorAlarm(commands, credsIssuerConfig); + registerClusterDishwasherModeSelect(commands, credsIssuerConfig); registerClusterAirQuality(commands, credsIssuerConfig); registerClusterSmokeCoAlarm(commands, credsIssuerConfig); registerClusterOperationalState(commands, credsIssuerConfig); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index a18d9173e3225e..120444bbebbb8b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -19,6 +19,81 @@ #include +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::detail::Structs::ModeTagStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ModeTagStruct.value", "value", value.isMember("value"))); + + char labelWithMember[kMaxLabelLength]; + if (value.isMember("mfgCode")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "mfgCode"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.mfgCode, value["mfgCode"])); + } + valueCopy.removeMember("mfgCode"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "value"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.value, value["value"])); + valueCopy.removeMember("value"); + + if (value.isMember("tagName")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "tagName"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.tagName, value["tagName"])); + } + valueCopy.removeMember("tagName"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::detail::Structs::ModeTagStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.mfgCode); + ComplexArgumentParser::Finalize(request.value); + ComplexArgumentParser::Finalize(request.tagName); +} + +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::detail::Structs::ModeOptionStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.label", "label", value.isMember("label"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.mode", "mode", value.isMember("mode"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.modeTags", "modeTags", value.isMember("modeTags"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "label"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.label, value["label"])); + valueCopy.removeMember("label"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "mode"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.mode, value["mode"])); + valueCopy.removeMember("mode"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "modeTags"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.modeTags, value["modeTags"])); + valueCopy.removeMember("modeTags"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::detail::Structs::ModeOptionStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.label); + ComplexArgumentParser::Finalize(request.mode); + ComplexArgumentParser::Finalize(request.modeTags); +} + CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request, Json::Value & value) { @@ -1828,106 +1903,6 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::IcdManagement::Structs ComplexArgumentParser::Finalize(request.fabricIndex); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::ModeSelect::Structs::SemanticTagStruct::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - // Copy to track which members we already processed. - Json::Value valueCopy(value); - - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("SemanticTagStruct.mfgCode", "mfgCode", value.isMember("mfgCode"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SemanticTagStruct.value", "value", value.isMember("value"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "mfgCode"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.mfgCode, value["mfgCode"])); - valueCopy.removeMember("mfgCode"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "value"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.value, value["value"])); - valueCopy.removeMember("value"); - - return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::ModeSelect::Structs::SemanticTagStruct::Type & request) -{ - ComplexArgumentParser::Finalize(request.mfgCode); - ComplexArgumentParser::Finalize(request.value); -} - -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - // Copy to track which members we already processed. - Json::Value valueCopy(value); - - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.label", "label", value.isMember("label"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.mode", "mode", value.isMember("mode"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.semanticTags", "semanticTags", value.isMember("semanticTags"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "label"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.label, value["label"])); - valueCopy.removeMember("label"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "mode"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.mode, value["mode"])); - valueCopy.removeMember("mode"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "semanticTags"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.semanticTags, value["semanticTags"])); - valueCopy.removeMember("semanticTags"); - - return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::Type & request) -{ - ComplexArgumentParser::Finalize(request.label); - ComplexArgumentParser::Finalize(request.mode); - ComplexArgumentParser::Finalize(request.semanticTags); -} - -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - // Copy to track which members we already processed. - Json::Value valueCopy(value); - - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("TemperatureLevelStruct.label", "label", value.isMember("label"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TemperatureLevelStruct.temperatureLevel", "temperatureLevel", - value.isMember("temperatureLevel"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "label"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.label, value["label"])); - valueCopy.removeMember("label"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "temperatureLevel"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.temperatureLevel, value["temperatureLevel"])); - valueCopy.removeMember("temperatureLevel"); - - return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::Type & request) -{ - ComplexArgumentParser::Finalize(request.label); - ComplexArgumentParser::Finalize(request.temperatureLevel); -} - CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::Type & request, Json::Value & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 0c8f95f2be9d0d..dea2397ae70c89 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -22,6 +22,16 @@ #include #include +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs::ModeTagStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::detail::Structs::ModeTagStruct::Type & request); + +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs::ModeOptionStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::detail::Structs::ModeOptionStruct::Type & request); + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request, Json::Value & value); @@ -224,22 +234,6 @@ static CHIP_ERROR Setup(const char * label, static void Finalize(chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ModeSelect::Structs::SemanticTagStruct::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::ModeSelect::Structs::SemanticTagStruct::Type & request); - -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::Type & request); - -static CHIP_ERROR Setup(const char * label, - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::Type & request); - static CHIP_ERROR Setup(const char * label, chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 9bf73bd157a487..085d9de02833c8 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -21,6 +21,72 @@ using namespace chip::app::Clusters; +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::detail::Structs::ModeTagStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("MfgCode", indent + 1, value.mfgCode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MfgCode'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Value", indent + 1, value.value); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Value'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("TagName", indent + 1, value.tagName); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TagName'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::detail::Structs::ModeOptionStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("Label", indent + 1, value.label); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Label'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Mode", indent + 1, value.mode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Mode'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("ModeTags", indent + 1, value.modeTags); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ModeTags'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::detail::Structs::ApplicationStruct::DecodableType & value) { @@ -1653,90 +1719,6 @@ DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ModeSelect::Structs::SemanticTagStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("MfgCode", indent + 1, value.mfgCode); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MfgCode'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("Value", indent + 1, value.value); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Value'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("Label", indent + 1, value.label); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Label'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("Mode", indent + 1, value.mode); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Mode'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("SemanticTags", indent + 1, value.semanticTags); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SemanticTags'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("Label", indent + 1, value.label); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Label'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("TemperatureLevel", indent + 1, value.temperatureLevel); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TemperatureLevel'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType & value) { @@ -4449,6 +4431,61 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ModeSelect::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const LaundryWasherModeSelect::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const RefrigeratorAndTemperatureControlledCabinetModeSelect::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const RvcRunModeSelect::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const RvcCleanModeSelect::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DishwasherModeSelect::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const OperationalState::Commands::OperationalCommandResponse::DecodableType & value) { @@ -7455,22 +7492,305 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case UserLabel::Attributes::EventList::Id: { + case UserLabel::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case UserLabel::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case UserLabel::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case UserLabel::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case ProxyConfiguration::Id: { + switch (path.mAttributeId) + { + case ProxyConfiguration::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case ProxyConfiguration::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case ProxyConfiguration::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case ProxyConfiguration::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case ProxyConfiguration::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case ProxyConfiguration::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case ProxyDiscovery::Id: { + switch (path.mAttributeId) + { + case ProxyDiscovery::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case ProxyDiscovery::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case ProxyDiscovery::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case ProxyDiscovery::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case ProxyDiscovery::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case ProxyDiscovery::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case ProxyValid::Id: { + switch (path.mAttributeId) + { + case ProxyValid::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case ProxyValid::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case ProxyValid::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case ProxyValid::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case ProxyValid::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case ProxyValid::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case BooleanState::Id: { + switch (path.mAttributeId) + { + case BooleanState::Attributes::StateValue::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StateValue", 1, value); + } + case BooleanState::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case BooleanState::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case BooleanState::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case BooleanState::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case BooleanState::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case BooleanState::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case IcdManagement::Id: { + switch (path.mAttributeId) + { + case IcdManagement::Attributes::IdleModeInterval::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("IdleModeInterval", 1, value); + } + case IcdManagement::Attributes::ActiveModeInterval::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ActiveModeInterval", 1, value); + } + case IcdManagement::Attributes::ActiveModeThreshold::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ActiveModeThreshold", 1, value); + } + case IcdManagement::Attributes::RegisteredClients::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RegisteredClients", 1, value); + } + case IcdManagement::Attributes::ICDCounter::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ICDCounter", 1, value); + } + case IcdManagement::Attributes::ClientsSupportedPerFabric::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClientsSupportedPerFabric", 1, value); + } + case IcdManagement::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case IcdManagement::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case IcdManagement::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case IcdManagement::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case IcdManagement::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case IcdManagement::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case ModeSelect::Id: { + switch (path.mAttributeId) + { + case ModeSelect::Attributes::Description::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Description", 1, value); + } + case ModeSelect::Attributes::StandardNamespace::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StandardNamespace", 1, value); + } + case ModeSelect::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedModes", 1, value); + } + case ModeSelect::Attributes::CurrentMode::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentMode", 1, value); + } + case ModeSelect::Attributes::StartUpMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StartUpMode", 1, value); + } + case ModeSelect::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnMode", 1, value); + } + case ModeSelect::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case ModeSelect::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case ModeSelect::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case UserLabel::Attributes::AttributeList::Id: { + case ModeSelect::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case UserLabel::Attributes::FeatureMap::Id: { + case ModeSelect::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case UserLabel::Attributes::ClusterRevision::Id: { + case ModeSelect::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7478,71 +7798,62 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case ProxyConfiguration::Id: { + case LaundryWasherModeSelect::Id: { switch (path.mAttributeId) { - case ProxyConfiguration::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GeneratedCommandList", 1, value); - } - case ProxyConfiguration::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; + case LaundryWasherModeSelect::Attributes::Description::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + return DataModelLogger::LogValue("Description", 1, value); } - case ProxyConfiguration::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; + case LaundryWasherModeSelect::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::LaundryWasherModeSelect::Structs::ModeOptionStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); + return DataModelLogger::LogValue("SupportedModes", 1, value); } - case ProxyConfiguration::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; + case LaundryWasherModeSelect::Attributes::CurrentMode::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AttributeList", 1, value); + return DataModelLogger::LogValue("CurrentMode", 1, value); } - case ProxyConfiguration::Attributes::FeatureMap::Id: { - uint32_t value; + case LaundryWasherModeSelect::Attributes::StartUpMode::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); + return DataModelLogger::LogValue("StartUpMode", 1, value); } - case ProxyConfiguration::Attributes::ClusterRevision::Id: { - uint16_t value; + case LaundryWasherModeSelect::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); - } + return DataModelLogger::LogValue("OnMode", 1, value); } - break; - } - case ProxyDiscovery::Id: { - switch (path.mAttributeId) - { - case ProxyDiscovery::Attributes::GeneratedCommandList::Id: { + case LaundryWasherModeSelect::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ProxyDiscovery::Attributes::AcceptedCommandList::Id: { + case LaundryWasherModeSelect::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ProxyDiscovery::Attributes::EventList::Id: { + case LaundryWasherModeSelect::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case ProxyDiscovery::Attributes::AttributeList::Id: { + case LaundryWasherModeSelect::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case ProxyDiscovery::Attributes::FeatureMap::Id: { + case LaundryWasherModeSelect::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ProxyDiscovery::Attributes::ClusterRevision::Id: { + case LaundryWasherModeSelect::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7550,35 +7861,62 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case ProxyValid::Id: { + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Id: { switch (path.mAttributeId) { - case ProxyValid::Attributes::GeneratedCommandList::Id: { + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::Description::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Description", 1, value); + } + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedModes", 1, value); + } + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::CurrentMode::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentMode", 1, value); + } + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::StartUpMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StartUpMode", 1, value); + } + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnMode", 1, value); + } + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ProxyValid::Attributes::AcceptedCommandList::Id: { + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ProxyValid::Attributes::EventList::Id: { + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case ProxyValid::Attributes::AttributeList::Id: { + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case ProxyValid::Attributes::FeatureMap::Id: { + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ProxyValid::Attributes::ClusterRevision::Id: { + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7586,40 +7924,55 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case BooleanState::Id: { + case WasherControls::Id: { switch (path.mAttributeId) { - case BooleanState::Attributes::StateValue::Id: { - bool value; + case WasherControls::Attributes::SpinSpeeds::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StateValue", 1, value); + return DataModelLogger::LogValue("SpinSpeeds", 1, value); } - case BooleanState::Attributes::GeneratedCommandList::Id: { + case WasherControls::Attributes::SpinSpeedCurrent::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SpinSpeedCurrent", 1, value); + } + case WasherControls::Attributes::NumberOfRinses::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NumberOfRinses", 1, value); + } + case WasherControls::Attributes::MaxRinses::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("MaxRinses", 1, value); + } + case WasherControls::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case BooleanState::Attributes::AcceptedCommandList::Id: { + case WasherControls::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case BooleanState::Attributes::EventList::Id: { + case WasherControls::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case BooleanState::Attributes::AttributeList::Id: { + case WasherControls::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case BooleanState::Attributes::FeatureMap::Id: { + case WasherControls::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case BooleanState::Attributes::ClusterRevision::Id: { + case WasherControls::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7627,67 +7980,61 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case IcdManagement::Id: { + case RvcRunModeSelect::Id: { switch (path.mAttributeId) { - case IcdManagement::Attributes::IdleModeInterval::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("IdleModeInterval", 1, value); - } - case IcdManagement::Attributes::ActiveModeInterval::Id: { - uint32_t value; + case RvcRunModeSelect::Attributes::Description::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveModeInterval", 1, value); + return DataModelLogger::LogValue("Description", 1, value); } - case IcdManagement::Attributes::ActiveModeThreshold::Id: { - uint16_t value; + case RvcRunModeSelect::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveModeThreshold", 1, value); + return DataModelLogger::LogValue("SupportedModes", 1, value); } - case IcdManagement::Attributes::RegisteredClients::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> - value; + case RvcRunModeSelect::Attributes::CurrentMode::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RegisteredClients", 1, value); + return DataModelLogger::LogValue("CurrentMode", 1, value); } - case IcdManagement::Attributes::ICDCounter::Id: { - uint32_t value; + case RvcRunModeSelect::Attributes::StartUpMode::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ICDCounter", 1, value); + return DataModelLogger::LogValue("StartUpMode", 1, value); } - case IcdManagement::Attributes::ClientsSupportedPerFabric::Id: { - uint16_t value; + case RvcRunModeSelect::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClientsSupportedPerFabric", 1, value); + return DataModelLogger::LogValue("OnMode", 1, value); } - case IcdManagement::Attributes::GeneratedCommandList::Id: { + case RvcRunModeSelect::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case IcdManagement::Attributes::AcceptedCommandList::Id: { + case RvcRunModeSelect::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case IcdManagement::Attributes::EventList::Id: { + case RvcRunModeSelect::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case IcdManagement::Attributes::AttributeList::Id: { + case RvcRunModeSelect::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case IcdManagement::Attributes::FeatureMap::Id: { + case RvcRunModeSelect::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case IcdManagement::Attributes::ClusterRevision::Id: { + case RvcRunModeSelect::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7695,65 +8042,61 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case ModeSelect::Id: { + case RvcCleanModeSelect::Id: { switch (path.mAttributeId) { - case ModeSelect::Attributes::Description::Id: { + case RvcCleanModeSelect::Attributes::Description::Id: { chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Description", 1, value); } - case ModeSelect::Attributes::StandardNamespace::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StandardNamespace", 1, value); - } - case ModeSelect::Attributes::SupportedModes::Id: { - chip::app::DataModel::DecodableList value; + case RvcCleanModeSelect::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SupportedModes", 1, value); } - case ModeSelect::Attributes::CurrentMode::Id: { + case RvcCleanModeSelect::Attributes::CurrentMode::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CurrentMode", 1, value); } - case ModeSelect::Attributes::StartUpMode::Id: { + case RvcCleanModeSelect::Attributes::StartUpMode::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("StartUpMode", 1, value); } - case ModeSelect::Attributes::OnMode::Id: { + case RvcCleanModeSelect::Attributes::OnMode::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OnMode", 1, value); } - case ModeSelect::Attributes::GeneratedCommandList::Id: { + case RvcCleanModeSelect::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ModeSelect::Attributes::AcceptedCommandList::Id: { + case RvcCleanModeSelect::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ModeSelect::Attributes::EventList::Id: { + case RvcCleanModeSelect::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case ModeSelect::Attributes::AttributeList::Id: { + case RvcCleanModeSelect::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case ModeSelect::Attributes::FeatureMap::Id: { + case RvcCleanModeSelect::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ModeSelect::Attributes::ClusterRevision::Id: { + case RvcCleanModeSelect::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7784,15 +8127,13 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Step", 1, value); } - case TemperatureControl::Attributes::CurrentTemperatureLevelIndex::Id: { + case TemperatureControl::Attributes::SelectedTemperatureLevel::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentTemperatureLevelIndex", 1, value); + return DataModelLogger::LogValue("SelectedTemperatureLevel", 1, value); } case TemperatureControl::Attributes::SupportedTemperatureLevels::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> - value; + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SupportedTemperatureLevels", 1, value); } @@ -7837,11 +8178,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Mask", 1, value); } - case RefrigeratorAlarm::Attributes::Latch::Id: { - chip::BitMask value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Latch", 1, value); - } case RefrigeratorAlarm::Attributes::State::Id: { chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -7880,6 +8216,68 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } + case DishwasherModeSelect::Id: { + switch (path.mAttributeId) + { + case DishwasherModeSelect::Attributes::Description::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Description", 1, value); + } + case DishwasherModeSelect::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedModes", 1, value); + } + case DishwasherModeSelect::Attributes::CurrentMode::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentMode", 1, value); + } + case DishwasherModeSelect::Attributes::StartUpMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StartUpMode", 1, value); + } + case DishwasherModeSelect::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnMode", 1, value); + } + case DishwasherModeSelect::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case DishwasherModeSelect::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case DishwasherModeSelect::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case DishwasherModeSelect::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case DishwasherModeSelect::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case DishwasherModeSelect::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } case AirQuality::Id: { switch (path.mAttributeId) { @@ -15833,6 +16231,72 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa } break; } + case ModeSelect::Id: { + switch (path.mCommandId) + { + case ModeSelect::Commands::ChangeToModeResponse::Id: { + ModeSelect::Commands::ChangeToModeResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ChangeToModeResponse", 1, value); + } + } + break; + } + case LaundryWasherModeSelect::Id: { + switch (path.mCommandId) + { + case LaundryWasherModeSelect::Commands::ChangeToModeResponse::Id: { + LaundryWasherModeSelect::Commands::ChangeToModeResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ChangeToModeResponse", 1, value); + } + } + break; + } + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Id: { + switch (path.mCommandId) + { + case RefrigeratorAndTemperatureControlledCabinetModeSelect::Commands::ChangeToModeResponse::Id: { + RefrigeratorAndTemperatureControlledCabinetModeSelect::Commands::ChangeToModeResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ChangeToModeResponse", 1, value); + } + } + break; + } + case RvcRunModeSelect::Id: { + switch (path.mCommandId) + { + case RvcRunModeSelect::Commands::ChangeToModeResponse::Id: { + RvcRunModeSelect::Commands::ChangeToModeResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ChangeToModeResponse", 1, value); + } + } + break; + } + case RvcCleanModeSelect::Id: { + switch (path.mCommandId) + { + case RvcCleanModeSelect::Commands::ChangeToModeResponse::Id: { + RvcCleanModeSelect::Commands::ChangeToModeResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ChangeToModeResponse", 1, value); + } + } + break; + } + case DishwasherModeSelect::Id: { + switch (path.mCommandId) + { + case DishwasherModeSelect::Commands::ChangeToModeResponse::Id: { + DishwasherModeSelect::Commands::ChangeToModeResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ChangeToModeResponse", 1, value); + } + } + break; + } case OperationalState::Id: { switch (path.mCommandId) { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index f33282738424de..5199662816d440 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -20,6 +20,12 @@ #include #include +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::detail::Structs::ModeTagStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::detail::Structs::ModeOptionStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::detail::Structs::ApplicationStruct::DecodableType & value); @@ -141,15 +147,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ModeSelect::Structs::SemanticTagStruct::DecodableType & value); - -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::DecodableType & value); - -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType & value); - static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType & value); @@ -458,6 +455,20 @@ LogValue(const char * label, size_t indent, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ModeSelect::Commands::ChangeToModeResponse::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::LaundryWasherModeSelect::Commands::ChangeToModeResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetModeSelect::Commands:: + ChangeToModeResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::RvcRunModeSelect::Commands::ChangeToModeResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::RvcCleanModeSelect::Commands::ChangeToModeResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DishwasherModeSelect::Commands::ChangeToModeResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType & value); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 1d4c20a87fc79e..eaac169bea6546 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -75,6 +75,7 @@ class TestList : public Command printf("Test_TC_CC_8_1\n"); printf("TestColorControl_9_1\n"); printf("TestColorControl_9_2\n"); + printf("TestIcdManagementCluster\n"); printf("Test_TC_OPCREDS_1_2\n"); printf("Test_TC_BINFO_1_1\n"); printf("Test_TC_BINFO_2_1\n"); @@ -22981,6 +22982,530 @@ class TestColorControl_9_2Suite : public TestCommand } }; +class TestIcdManagementClusterSuite : public TestCommand +{ +public: + TestIcdManagementClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("TestIcdManagementCluster", 26, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~TestIcdManagementClusterSuite() {} + + 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)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("idleModeInterval", value, 500UL)); + } + 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("activeModeInterval", value, 300UL)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("activeModeThreshold", value, 300U)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("ICDCounter", value, 0UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clientsSupportedPerFabric", value, 2U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 0)); + } + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("ICDCounter", value.ICDCounter, 0UL)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("ICDCounter", value.ICDCounter, 0UL)); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 0)); + VerifyOrReturn(CheckValue("registeredClients[0].checkInNodeID", iter_0.GetValue().checkInNodeID, 101ULL)); + VerifyOrReturn( + CheckValue("registeredClients[0].monitoredSubject", iter_0.GetValue().monitoredSubject, 1001ULL)); + VerifyOrReturn(CheckValueAsString( + "registeredClients[0].key", iter_0.GetValue().key, + chip::ByteSpan( + chip::Uint8::from_const_char("\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"), 16))); + VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 1)); + VerifyOrReturn(CheckValue("registeredClients[1].checkInNodeID", iter_0.GetValue().checkInNodeID, 201ULL)); + VerifyOrReturn( + CheckValue("registeredClients[1].monitoredSubject", iter_0.GetValue().monitoredSubject, 2001ULL)); + VerifyOrReturn(CheckValueAsString("registeredClients[1].key", iter_0.GetValue().key, + chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./"), 16))); + VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 2)); + } + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("ICDCounter", value.ICDCounter, 0UL)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 0)); + VerifyOrReturn(CheckValue("registeredClients[0].checkInNodeID", iter_0.GetValue().checkInNodeID, 101ULL)); + VerifyOrReturn( + CheckValue("registeredClients[0].monitoredSubject", iter_0.GetValue().monitoredSubject, 1002ULL)); + VerifyOrReturn(CheckValueAsString( + "registeredClients[0].key", iter_0.GetValue().key, + chip::ByteSpan(chip::Uint8::from_const_char("\001\021!1AQaq\201\221\241\261\301\321\341\361"), 16))); + VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 1)); + VerifyOrReturn(CheckValue("registeredClients[1].checkInNodeID", iter_0.GetValue().checkInNodeID, 201ULL)); + VerifyOrReturn( + CheckValue("registeredClients[1].monitoredSubject", iter_0.GetValue().monitoredSubject, 2001ULL)); + VerifyOrReturn(CheckValueAsString("registeredClients[1].key", iter_0.GetValue().key, + chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./"), 16))); + VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 2)); + } + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("ICDCounter", value.ICDCounter, 0UL)); + } + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 0)); + VerifyOrReturn(CheckValue("registeredClients[0].checkInNodeID", iter_0.GetValue().checkInNodeID, 101ULL)); + VerifyOrReturn( + CheckValue("registeredClients[0].monitoredSubject", iter_0.GetValue().monitoredSubject, 1002ULL)); + VerifyOrReturn(CheckValueAsString( + "registeredClients[0].key", iter_0.GetValue().key, + chip::ByteSpan(chip::Uint8::from_const_char("\001\021!1AQaq\201\221\241\261\301\321\341\361"), 16))); + VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 1)); + VerifyOrReturn(CheckValue("registeredClients[1].checkInNodeID", iter_0.GetValue().checkInNodeID, 201ULL)); + VerifyOrReturn( + CheckValue("registeredClients[1].monitoredSubject", iter_0.GetValue().monitoredSubject, 2002ULL)); + VerifyOrReturn(CheckValueAsString( + "registeredClients[1].key", iter_0.GetValue().key, + chip::ByteSpan(chip::Uint8::from_const_char("\002\022\0422BRbr\202\222\242\262\302\322\342/"), 16))); + VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 2)); + } + } + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 0)); + VerifyOrReturn(CheckValue("registeredClients[0].checkInNodeID", iter_0.GetValue().checkInNodeID, 201ULL)); + VerifyOrReturn( + CheckValue("registeredClients[0].monitoredSubject", iter_0.GetValue().monitoredSubject, 2002ULL)); + VerifyOrReturn(CheckValueAsString( + "registeredClients[0].key", iter_0.GetValue().key, + chip::ByteSpan(chip::Uint8::from_const_char("\002\022\0422BRbr\202\222\242\262\302\322\342/"), 16))); + VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 1)); + } + } + 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::DataModel::DecodableList< + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 0)); + } + } + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + 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, "Read IdleModeInterval"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::IdleModeInterval::Id, + true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read ActiveModeInterval"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, + IcdManagement::Attributes::ActiveModeInterval::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Read ActiveModeThreshold"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, + IcdManagement::Attributes::ActiveModeThreshold::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read ICDCounter"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::ICDCounter::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "Read ClientsSupportedPerFabric"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, + IcdManagement::Attributes::ClientsSupportedPerFabric::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Unregister 1.0"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; + value.checkInNodeID = 101ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, + value, chip::NullOptional + + ); + } + case 7: { + LogStep(7, "Unregister 2.0"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; + value.checkInNodeID = 102ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, + value, chip::NullOptional + + ); + } + case 8: { + LogStep(8, "Unregister 3.0"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; + value.checkInNodeID = 102ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, + value, chip::NullOptional + + ); + } + case 9: { + LogStep(9, "Read RegisteredClients"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, + IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "Register 1.0 (key too short)"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; + value.checkInNodeID = 101ULL; + value.monitoredSubject = 1001ULL; + value.key = + chip::ByteSpan(chip::Uint8::from_const_char( + "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036garbage: not in length on purpose"), + 15); + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, + value, chip::NullOptional + + ); + } + case 11: { + LogStep(11, "Register 1.0 (key too long)"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; + value.checkInNodeID = 101ULL; + value.monitoredSubject = 1001ULL; + value.key = chip::ByteSpan( + chip::Uint8::from_const_char( + "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\377garbage: not in length on purpose"), + 17); + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, + value, chip::NullOptional + + ); + } + case 12: { + LogStep(12, "Register 1.1"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; + value.checkInNodeID = 101ULL; + value.monitoredSubject = 1001ULL; + value.key = chip::ByteSpan( + chip::Uint8::from_const_char( + "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037garbage: not in length on purpose"), + 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, + value, chip::NullOptional + + ); + } + case 13: { + LogStep(13, "Register 2.1"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; + value.checkInNodeID = 201ULL; + value.monitoredSubject = 2001ULL; + value.key = chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./garbage: not in length on purpose"), 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, + value, chip::NullOptional + + ); + } + case 14: { + LogStep(14, "Register 3.1"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; + value.checkInNodeID = 301ULL; + value.monitoredSubject = 3001ULL; + value.key = chip::ByteSpan(chip::Uint8::from_const_char("0123456789:;<=>?garbage: not in length on purpose"), 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, + value, chip::NullOptional + + ); + } + case 15: { + LogStep(15, "Read RegisteredClients"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, + IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Register 1.1"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; + value.checkInNodeID = 101ULL; + value.monitoredSubject = 1002ULL; + value.key = chip::ByteSpan( + chip::Uint8::from_const_char("\001\021!1AQaq\201\221\241\261\301\321\341\361garbage: not in length on purpose"), + 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, + value, chip::NullOptional + + ); + } + case 17: { + LogStep(17, "Read RegisteredClients"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, + IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); + } + case 18: { + LogStep(18, "Register 2.2 (wrong verification key)"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; + value.checkInNodeID = 201ULL; + value.monitoredSubject = 2002ULL; + value.key = chip::ByteSpan( + chip::Uint8::from_const_char("\002\022\0422BRbr\202\222\242\262\302\322\342/garbage: not in length on purpose"), + 16); + value.verificationKey.Emplace(); + value.verificationKey.Value() = + chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-//garbage: not in length on purpose"), 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, + value, chip::NullOptional + + ); + } + case 19: { + LogStep(19, "Read RegisteredClients"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, + IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); + } + case 20: { + LogStep(20, "Unregister 1.1 (wrong key)"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; + value.checkInNodeID = 101ULL; + value.key.Emplace(); + value.key.Value() = chip::ByteSpan( + chip::Uint8::from_const_char("\001!!1AQaq\201\221\241\261\301\321\341\361garbage: not in length on purpose"), 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, + value, chip::NullOptional + + ); + } + case 21: { + LogStep(21, "Read RegisteredClients"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, + IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); + } + case 22: { + LogStep(22, "Unregister 2.1"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; + value.checkInNodeID = 201ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, + value, chip::NullOptional + + ); + } + case 23: { + LogStep(23, "Read RegisteredClients"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, + IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); + } + case 24: { + LogStep(24, "Unregister 1.3"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; + value.checkInNodeID = 101ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, + value, chip::NullOptional + + ); + } + case 25: { + LogStep(25, "Unregister 2.2"); + ListFreer listFreer; + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; + value.checkInNodeID = 102ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, + value, chip::NullOptional + + ); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_OPCREDS_1_2Suite : public TestCommand { public: @@ -76742,7 +77267,7 @@ class TestModeSelectClusterSuite : public TestCommand { public: TestModeSelectClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestModeSelectCluster", 32, credsIssuerConfig) + TestCommand("TestModeSelectCluster", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76791,15 +77316,6 @@ class TestModeSelectClusterSuite : public TestCommand } break; case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("standardNamespace", value)); - VerifyOrReturn(CheckValue("standardNamespace.Value()", value.Value(), 0U)); - } - break; - case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList @@ -76812,36 +77328,36 @@ class TestModeSelectClusterSuite : public TestCommand CheckValueAsString("supportedModes[0].label", iter_0.GetValue().label, chip::CharSpan("Black", 5))); VerifyOrReturn(CheckValue("supportedModes[0].mode", iter_0.GetValue().mode, 0U)); { - auto iter_2 = iter_0.GetValue().semanticTags.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "supportedModes[0].semanticTags", iter_2, 0)); - VerifyOrReturn(CheckValue("supportedModes[0].semanticTags[0].value", iter_2.GetValue().value, 0U)); - VerifyOrReturn(CheckNoMoreListItems( - "supportedModes[0].semanticTags", iter_2, 1)); + auto iter_2 = iter_0.GetValue().modeTags.begin(); + VerifyOrReturn(CheckNextListItemDecodes("supportedModes[0].modeTags", + iter_2, 0)); + VerifyOrReturn(CheckValue("supportedModes[0].modeTags[0].value", iter_2.GetValue().value, 0U)); + VerifyOrReturn( + CheckNoMoreListItems("supportedModes[0].modeTags", iter_2, 1)); } VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 1)); VerifyOrReturn( CheckValueAsString("supportedModes[1].label", iter_0.GetValue().label, chip::CharSpan("Cappuccino", 10))); VerifyOrReturn(CheckValue("supportedModes[1].mode", iter_0.GetValue().mode, 4U)); { - auto iter_2 = iter_0.GetValue().semanticTags.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "supportedModes[1].semanticTags", iter_2, 0)); - VerifyOrReturn(CheckValue("supportedModes[1].semanticTags[0].value", iter_2.GetValue().value, 0U)); - VerifyOrReturn(CheckNoMoreListItems( - "supportedModes[1].semanticTags", iter_2, 1)); + auto iter_2 = iter_0.GetValue().modeTags.begin(); + VerifyOrReturn(CheckNextListItemDecodes("supportedModes[1].modeTags", + iter_2, 0)); + VerifyOrReturn(CheckValue("supportedModes[1].modeTags[0].value", iter_2.GetValue().value, 0U)); + VerifyOrReturn( + CheckNoMoreListItems("supportedModes[1].modeTags", iter_2, 1)); } VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 2)); VerifyOrReturn( CheckValueAsString("supportedModes[2].label", iter_0.GetValue().label, chip::CharSpan("Espresso", 8))); VerifyOrReturn(CheckValue("supportedModes[2].mode", iter_0.GetValue().mode, 7U)); { - auto iter_2 = iter_0.GetValue().semanticTags.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "supportedModes[2].semanticTags", iter_2, 0)); - VerifyOrReturn(CheckValue("supportedModes[2].semanticTags[0].value", iter_2.GetValue().value, 0U)); - VerifyOrReturn(CheckNoMoreListItems( - "supportedModes[2].semanticTags", iter_2, 1)); + auto iter_2 = iter_0.GetValue().modeTags.begin(); + VerifyOrReturn(CheckNextListItemDecodes("supportedModes[2].modeTags", + iter_2, 0)); + VerifyOrReturn(CheckValue("supportedModes[2].modeTags[0].value", iter_2.GetValue().value, 0U)); + VerifyOrReturn( + CheckNoMoreListItems("supportedModes[2].modeTags", iter_2, 1)); } VerifyOrReturn(CheckNoMoreListItems("supportedModes", iter_0, 3)); } @@ -76850,7 +77366,7 @@ class TestModeSelectClusterSuite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value, 3)); } break; - case 4: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -76858,7 +77374,7 @@ class TestModeSelectClusterSuite : public TestCommand VerifyOrReturn(CheckValue("currentMode", value, 0U)); } break; - case 5: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -76867,7 +77383,7 @@ class TestModeSelectClusterSuite : public TestCommand VerifyOrReturn(CheckValue("startUpMode.Value()", value.Value(), 0U)); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -76875,10 +77391,10 @@ class TestModeSelectClusterSuite : public TestCommand VerifyOrReturn(CheckValueNull("onMode", value)); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -76887,16 +77403,16 @@ class TestModeSelectClusterSuite : public TestCommand currentModeBeforeToggle = value; } break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -76904,13 +77420,13 @@ class TestModeSelectClusterSuite : public TestCommand VerifyOrReturn(CheckValue("currentMode", value, currentModeBeforeToggle)); } break; - case 13: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 14: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -76920,13 +77436,13 @@ class TestModeSelectClusterSuite : public TestCommand OnModeValue = value; } break; - case 16: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -76934,13 +77450,13 @@ class TestModeSelectClusterSuite : public TestCommand VerifyOrReturn(CheckValue("currentMode", value, OnModeValue)); } break; - case 19: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 20: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -76949,6 +77465,9 @@ class TestModeSelectClusterSuite : public TestCommand VerifyOrReturn(CheckValue("startUpMode.Value()", value.Value(), 7U)); } break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; @@ -76957,16 +77476,13 @@ class TestModeSelectClusterSuite : public TestCommand break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; 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)); - shouldContinue = true; - break; - case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -76974,18 +77490,18 @@ class TestModeSelectClusterSuite : public TestCommand VerifyOrReturn(CheckValue("currentMode", value, 4U)); } break; - case 28: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 30: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -77021,32 +77537,27 @@ class TestModeSelectClusterSuite : public TestCommand chip::NullOptional); } case 2: { - LogStep(2, "Read StandardNamespace"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StandardNamespace::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read SupportedModes"); + LogStep(2, "Read SupportedModes"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::SupportedModes::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Read CurrentMode"); + case 3: { + LogStep(3, "Read CurrentMode"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read StartUpMode"); + case 4: { + LogStep(4, "Read StartUpMode"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StartUpMode::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read OnMode"); + case 5: { + LogStep(5, "Read OnMode"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Change to Supported Mode"); + case 6: { + LogStep(6, "Change to Supported Mode"); ListFreer listFreer; chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type value; value.newMode = 4U; @@ -77055,13 +77566,13 @@ class TestModeSelectClusterSuite : public TestCommand ); } - case 8: { - LogStep(8, "Verify Current Mode Change"); + case 7: { + LogStep(7, "Verify Current Mode Change"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Change to Unsupported Mode"); + case 8: { + LogStep(8, "Change to Unsupported Mode"); ListFreer listFreer; chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type value; value.newMode = 2U; @@ -77070,29 +77581,29 @@ class TestModeSelectClusterSuite : public TestCommand ); } - case 10: { - LogStep(10, "Toggle OnOff"); + case 9: { + LogStep(9, "Toggle OnOff"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 11: { - LogStep(11, "Toggle OnOff"); + case 10: { + LogStep(10, "Toggle OnOff"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "Verify Current Mode does not change when OnMode is null"); + case 11: { + LogStep(11, "Verify Current Mode does not change when OnMode is null"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Change to Unsupported OnMode"); + case 12: { + LogStep(12, "Change to Unsupported OnMode"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); @@ -77100,8 +77611,8 @@ class TestModeSelectClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 14: { - LogStep(14, "Change OnMode"); + case 13: { + LogStep(13, "Change OnMode"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); @@ -77109,34 +77620,34 @@ class TestModeSelectClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 15: { - LogStep(15, "Verify OnMode"); + case 14: { + LogStep(14, "Verify OnMode"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Toggle OnOff"); + case 15: { + LogStep(15, "Toggle OnOff"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 17: { - LogStep(17, "Toggle OnOff"); + case 16: { + LogStep(16, "Toggle OnOff"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional ); } - case 18: { - LogStep(18, "Verify Current Mode Changes if OnMode is not null"); + case 17: { + LogStep(17, "Verify Current Mode Changes if OnMode is not null"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Change to Unsupported StartUp Mode"); + case 18: { + LogStep(18, "Change to Unsupported StartUp Mode"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); @@ -77144,8 +77655,8 @@ class TestModeSelectClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StartUpMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 20: { - LogStep(20, "Change to Supported StartUp Mode"); + case 19: { + LogStep(19, "Change to Supported StartUp Mode"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); @@ -77153,13 +77664,13 @@ class TestModeSelectClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StartUpMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 21: { - LogStep(21, "Verify StartUp Mode Change"); + case 20: { + LogStep(20, "Verify StartUp Mode Change"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StartUpMode::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Change CurrentMode to another value"); + case 21: { + LogStep(21, "Change CurrentMode to another value"); ListFreer listFreer; chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type value; value.newMode = 0U; @@ -77168,8 +77679,8 @@ class TestModeSelectClusterSuite : public TestCommand ); } - case 23: { - LogStep(23, "Change On Mode"); + case 22: { + LogStep(22, "Change On Mode"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); @@ -77177,8 +77688,8 @@ class TestModeSelectClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 24: { - LogStep(24, "Set StartUpOnOff"); + case 23: { + LogStep(23, "Set StartUpOnOff"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); @@ -77186,47 +77697,47 @@ class TestModeSelectClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, value, chip::NullOptional, chip::NullOptional); } - case 25: { - LogStep(25, "Reboot target device"); + case 24: { + LogStep(24, "Reboot target device"); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot(kIdentityAlpha, value); } - case 26: { - LogStep(26, "Wait for the commissioned device to be retrieved"); + case 25: { + LogStep(25, "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 27: { - LogStep(27, "Verify Current Mode Change based on OnMode, as it overwrites StartUpMode"); + case 26: { + LogStep(26, "Verify Current Mode Change based on OnMode, as it overwrites StartUpMode"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Change On Mode to Null"); + case 27: { + LogStep(27, "Change On Mode to Null"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNull(); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 29: { - LogStep(29, "Reboot target device"); + case 28: { + LogStep(28, "Reboot target device"); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot(kIdentityAlpha, value); } - case 30: { - LogStep(30, "Wait for the commissioned device to be retrieved"); + case 29: { + LogStep(29, "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 31: { - LogStep(31, "Verify Current Mode Change based on new StartUp Mode"); + case 30: { + LogStep(30, "Verify Current Mode Change based on new StartUp Mode"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, chip::NullOptional); } @@ -94968,7 +95479,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { public: TestGroupKeyManagementClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGroupKeyManagementCluster", 47, credsIssuerConfig) + TestCommand("TestGroupKeyManagementCluster", 48, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -95071,18 +95582,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintContains("value", value.groupKeySetIDs, 417U)); + VerifyOrReturn(CheckConstraintContains("value", value.groupKeySetIDs, 418U)); + VerifyOrReturn(CheckConstraintContains("value", value.groupKeySetIDs, 0U)); + } break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -95111,7 +95632,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -95156,7 +95677,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -95185,7 +95706,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -95230,7 +95751,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -95239,7 +95760,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -95248,7 +95769,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -95257,7 +95778,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -95266,7 +95787,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 260U)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -95275,7 +95796,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 261U)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -95344,7 +95865,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -95427,7 +95948,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -95454,7 +95975,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -95537,13 +96058,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -95564,7 +96085,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -95585,7 +96106,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; @@ -95594,7 +96115,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -95649,10 +96170,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -95665,14 +96186,11 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -95687,6 +96205,9 @@ class TestGroupKeyManagementClusterSuite : public TestCommand 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)); { chip::app::DataModel::DecodableList< @@ -95703,10 +96224,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -95963,7 +96484,16 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } case 12: { - LogStep(12, "Write Group Keys (invalid)"); + LogStep(12, "KeySet Read All Indices"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetReadAllIndices::Id, value, chip::NullOptional + + ); + } + case 13: { + LogStep(13, "Write Group Keys (invalid)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -95981,8 +96511,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 13: { - LogStep(13, "Write Group Keys (too many)"); + case 14: { + LogStep(14, "Write Group Keys (too many)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -96052,8 +96582,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 14: { - LogStep(14, "Write Group Keys on alpha"); + case 15: { + LogStep(15, "Write Group Keys on alpha"); ListFreer listFreer; chip::app::DataModel::List value; @@ -96083,8 +96613,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 15: { - LogStep(15, "Write Group Keys on beta"); + case 16: { + LogStep(16, "Write Group Keys on beta"); ListFreer listFreer; chip::app::DataModel::List value; @@ -96114,28 +96644,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 16: { - LogStep(16, "Read Group Keys on alpha"); + case 17: { + LogStep(17, "Read Group Keys on alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Read Group Keys on alpha without fabric filtering"); + case 18: { + LogStep(18, "Read Group Keys on alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 18: { - LogStep(18, "Read Group Keys on beta"); + case 19: { + LogStep(19, "Read Group Keys on beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Read Group Keys on beta without fabric filtering"); + case 20: { + LogStep(20, "Read Group Keys on beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 20: { - LogStep(20, "Add Group 1"); + case 21: { + LogStep(21, "Add Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 257U; @@ -96144,8 +96674,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 21: { - LogStep(21, "Add Group 2"); + case 22: { + LogStep(22, "Add Group 2"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 258U; @@ -96154,8 +96684,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 22: { - LogStep(22, "Add Group 3"); + case 23: { + LogStep(23, "Add Group 3"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 259U; @@ -96164,8 +96694,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 23: { - LogStep(23, "Add Group 4"); + case 24: { + LogStep(24, "Add Group 4"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 260U; @@ -96174,8 +96704,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 24: { - LogStep(24, "Add Group 5"); + case 25: { + LogStep(25, "Add Group 5"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 261U; @@ -96184,28 +96714,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 25: { - LogStep(25, "Read GroupTable from alpha"); + case 26: { + LogStep(26, "Read GroupTable from alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Read GroupTable from alpha without fabric filtering"); + case 27: { + LogStep(27, "Read GroupTable from alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 27: { - LogStep(27, "Read GroupTable from beta"); + case 28: { + LogStep(28, "Read GroupTable from beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Read GroupTable from beta without fabric filtering"); + case 29: { + LogStep(29, "Read GroupTable from beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 29: { - LogStep(29, "KeySet Remove 1"); + case 30: { + LogStep(30, "KeySet Remove 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -96214,8 +96744,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 30: { - LogStep(30, "KeySet Read (removed)"); + case 31: { + LogStep(31, "KeySet Read (removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 417U; @@ -96224,8 +96754,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 31: { - LogStep(31, "KeySet Read (not removed) CacheAndSync"); + case 32: { + LogStep(32, "KeySet Read (not removed) CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -96235,8 +96765,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 32: { - LogStep(32, "KeySet Read (not removed) TrustFirst"); + case 33: { + LogStep(33, "KeySet Read (not removed) TrustFirst"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -96246,8 +96776,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 33: { - LogStep(33, "Remove Group 1"); + case 34: { + LogStep(34, "Remove Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; value.groupID = 257U; @@ -96256,13 +96786,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 34: { - LogStep(34, "Read GroupTable 2"); + case 35: { + LogStep(35, "Read GroupTable 2"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Remove All"); + case 36: { + LogStep(36, "Remove All"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, @@ -96270,13 +96800,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 36: { - LogStep(36, "Read GroupTable 3"); + case 37: { + LogStep(37, "Read GroupTable 3"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "KeySet Remove 2"); + case 38: { + LogStep(38, "KeySet Remove 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -96285,8 +96815,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 38: { - LogStep(38, "KeySet Read (also removed)"); + case 39: { + LogStep(39, "KeySet Read (also removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 418U; @@ -96295,8 +96825,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 39: { - LogStep(39, "KeySet Write 1"); + case 40: { + LogStep(40, "KeySet Write 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -96330,8 +96860,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 40: { - LogStep(40, "KeySet Write 2 CacheAndSync"); + case 41: { + LogStep(41, "KeySet Write 2 CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -96366,8 +96896,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 41: { - LogStep(41, "KeySet Write 2 TrustFirst"); + case 42: { + LogStep(42, "KeySet Write 2 TrustFirst"); VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -96402,8 +96932,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 42: { - LogStep(42, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); + case 43: { + LogStep(43, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); ListFreer listFreer; chip::app::DataModel::List value; @@ -96429,8 +96959,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 43: { - LogStep(43, "Remove keyset 1"); + case 44: { + LogStep(44, "Remove keyset 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -96439,13 +96969,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 44: { - LogStep(44, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); + case 45: { + LogStep(45, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 45: { - LogStep(45, "Remove keyset 2"); + case 46: { + LogStep(46, "Remove keyset 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -96454,8 +96984,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 46: { - LogStep(46, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); + case 47: { + LogStep(47, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } @@ -122107,6 +122637,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), diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 5840ca5d195d1c..f6ee356ad5f46c 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -77,8 +77,14 @@ | BooleanState | 0x0045 | | IcdManagement | 0x0046 | | ModeSelect | 0x0050 | +| LaundryWasherModeSelect | 0x0051 | +| RefrigeratorAndTemperatureControlledCabinetModeSelect | 0x0052 | +| WasherControls | 0x0053 | +| RvcRunModeSelect | 0x0054 | +| RvcCleanModeSelect | 0x0055 | | TemperatureControl | 0x0056 | | RefrigeratorAlarm | 0x0057 | +| DishwasherModeSelect | 0x0059 | | AirQuality | 0x005B | | SmokeCoAlarm | 0x005C | | OperationalState | 0x0060 | @@ -37214,9 +37220,7 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { public: GroupKeyManagementKeySetReadAllIndices() : ClusterCommand("key-set-read-all-indices") - , mComplex_GroupKeySetIDs(&mRequest.groupKeySetIDs) { - AddArgument("GroupKeySetIDs", &mComplex_GroupKeySetIDs); ClusterCommand::AddArguments(); } @@ -37231,15 +37235,6 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.groupKeySetIDs) { - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; - [array_0 addObject:newElement_0]; - } - params.groupKeySetIDs = array_0; - } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -37262,8 +37257,6 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { } private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type mRequest; - TypedComplexArgument> mComplex_GroupKeySetIDs; }; /* @@ -39616,6 +39609,7 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | +| * ChangeToModeWithStatus | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | | * Description | 0x0000 | @@ -40601,18 +40595,15 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster TemperatureControl | 0x0056 | +| Cluster WasherControls | 0x0053 | |------------------------------------------------------------------------------| | Commands: | | -| * SetTemperature | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * TemperatureSetpoint | 0x0000 | -| * MinTemperature | 0x0001 | -| * MaxTemperature | 0x0002 | -| * Step | 0x0003 | -| * CurrentTemperatureLevelIndex | 0x0004 | -| * SupportedTemperatureLevels | 0x0005 | +| * SpinSpeeds | 0x0000 | +| * SpinSpeedCurrent | 0x0001 | +| * NumberOfRinses | 0x0002 | +| * MaxRinses | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -40624,85 +40615,29 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command SetTemperature + * Attribute SpinSpeeds */ -class TemperatureControlSetTemperature : public ClusterCommand { +class ReadWasherControlsSpinSpeeds : public ReadAttribute { public: - TemperatureControlSetTemperature() - : ClusterCommand("set-temperature") + ReadWasherControlsSpinSpeeds() + : ReadAttribute("spin-speeds") { - AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); - AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.targetTemperature.HasValue()) { - params.targetTemperature = [NSNumber numberWithShort:mRequest.targetTemperature.Value()]; - } else { - params.targetTemperature = nil; - } - if (mRequest.targetTemperatureLevel.HasValue()) { - params.targetTemperatureLevel = [NSNumber numberWithUnsignedChar:mRequest.targetTemperatureLevel.Value()]; - } else { - params.targetTemperatureLevel = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setTemperatureWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; -}; - -/* - * Attribute TemperatureSetpoint - */ -class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { -public: - ReadTemperatureControlTemperatureSetpoint() - : ReadAttribute("temperature-setpoint") - { - } - - ~ReadTemperatureControlTemperatureSetpoint() {} + ~ReadWasherControlsSpinSpeeds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.SpinSpeeds response %@", [value description]); if (error != nil) { - LogNSError("TemperatureControl TemperatureSetpoint read Error", error); + LogNSError("WasherControls SpinSpeeds read Error", error); } SetCommandExitStatus(error); }]; @@ -40710,22 +40645,22 @@ class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlTemperatureSetpoint : public SubscribeAttribute { +class SubscribeAttributeWasherControlsSpinSpeeds : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlTemperatureSetpoint() - : SubscribeAttribute("temperature-setpoint") + SubscribeAttributeWasherControlsSpinSpeeds() + : SubscribeAttribute("spin-speeds") { } - ~SubscribeAttributeTemperatureControlTemperatureSetpoint() {} + ~SubscribeAttributeWasherControlsSpinSpeeds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40736,12 +40671,12 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointWithParams:params + [cluster subscribeAttributeSpinSpeedsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.SpinSpeeds response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40750,29 +40685,29 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe }; /* - * Attribute MinTemperature + * Attribute SpinSpeedCurrent */ -class ReadTemperatureControlMinTemperature : public ReadAttribute { +class ReadWasherControlsSpinSpeedCurrent : public ReadAttribute { public: - ReadTemperatureControlMinTemperature() - : ReadAttribute("min-temperature") + ReadWasherControlsSpinSpeedCurrent() + : ReadAttribute("spin-speed-current") { } - ~ReadTemperatureControlMinTemperature() {} + ~ReadWasherControlsSpinSpeedCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.SpinSpeedCurrent response %@", [value description]); if (error != nil) { - LogNSError("TemperatureControl MinTemperature read Error", error); + LogNSError("WasherControls SpinSpeedCurrent read Error", error); } SetCommandExitStatus(error); }]; @@ -40780,92 +40715,62 @@ class ReadTemperatureControlMinTemperature : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttribute { +class WriteWasherControlsSpinSpeedCurrent : public WriteAttribute { public: - SubscribeAttributeTemperatureControlMinTemperature() - : SubscribeAttribute("min-temperature") + WriteWasherControlsSpinSpeedCurrent() + : WriteAttribute("spin-speed-current") { + AddArgument("attr-name", "spin-speed-current"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureControlMinTemperature() {} + ~WriteWasherControlsSpinSpeedCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000053) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinTemperatureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + [cluster writeAttributeSpinSpeedCurrentWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("WasherControls SpinSpeedCurrent write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; -/* - * Attribute MaxTemperature - */ -class ReadTemperatureControlMaxTemperature : public ReadAttribute { -public: - ReadTemperatureControlMaxTemperature() - : ReadAttribute("max-temperature") - { - } - - ~ReadTemperatureControlMaxTemperature() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); - if (error != nil) { - LogNSError("TemperatureControl MaxTemperature read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint8_t mValue; }; -class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttribute { +class SubscribeAttributeWasherControlsSpinSpeedCurrent : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlMaxTemperature() - : SubscribeAttribute("max-temperature") + SubscribeAttributeWasherControlsSpinSpeedCurrent() + : SubscribeAttribute("spin-speed-current") { } - ~SubscribeAttributeTemperatureControlMaxTemperature() {} + ~SubscribeAttributeWasherControlsSpinSpeedCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40876,12 +40781,12 @@ class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxTemperatureWithParams:params + [cluster subscribeAttributeSpinSpeedCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); + NSLog(@"WasherControls.SpinSpeedCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40890,29 +40795,29 @@ class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttri }; /* - * Attribute Step + * Attribute NumberOfRinses */ -class ReadTemperatureControlStep : public ReadAttribute { +class ReadWasherControlsNumberOfRinses : public ReadAttribute { public: - ReadTemperatureControlStep() - : ReadAttribute("step") + ReadWasherControlsNumberOfRinses() + : ReadAttribute("number-of-rinses") { } - ~ReadTemperatureControlStep() {} + ~ReadWasherControlsNumberOfRinses() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.NumberOfRinses response %@", [value description]); if (error != nil) { - LogNSError("TemperatureControl Step read Error", error); + LogNSError("WasherControls NumberOfRinses read Error", error); } SetCommandExitStatus(error); }]; @@ -40920,22 +40825,62 @@ class ReadTemperatureControlStep : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { +class WriteWasherControlsNumberOfRinses : public WriteAttribute { public: - SubscribeAttributeTemperatureControlStep() - : SubscribeAttribute("step") + WriteWasherControlsNumberOfRinses() + : WriteAttribute("number-of-rinses") { + AddArgument("attr-name", "number-of-rinses"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureControlStep() {} + ~WriteWasherControlsNumberOfRinses() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000053) WriteAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeNumberOfRinsesWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("WasherControls NumberOfRinses write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeWasherControlsNumberOfRinses : public SubscribeAttribute { +public: + SubscribeAttributeWasherControlsNumberOfRinses() + : SubscribeAttribute("number-of-rinses") + { + } + + ~SubscribeAttributeWasherControlsNumberOfRinses() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40946,12 +40891,12 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStepWithParams:params + [cluster subscribeAttributeNumberOfRinsesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step response %@", [value description]); + NSLog(@"WasherControls.NumberOfRinses response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40960,29 +40905,29 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { }; /* - * Attribute CurrentTemperatureLevelIndex + * Attribute MaxRinses */ -class ReadTemperatureControlCurrentTemperatureLevelIndex : public ReadAttribute { +class ReadWasherControlsMaxRinses : public ReadAttribute { public: - ReadTemperatureControlCurrentTemperatureLevelIndex() - : ReadAttribute("current-temperature-level-index") + ReadWasherControlsMaxRinses() + : ReadAttribute("max-rinses") { } - ~ReadTemperatureControlCurrentTemperatureLevelIndex() {} + ~ReadWasherControlsMaxRinses() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentTemperatureLevelIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.CurrentTemperatureLevelIndex response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.MaxRinses response %@", [value description]); if (error != nil) { - LogNSError("TemperatureControl CurrentTemperatureLevelIndex read Error", error); + LogNSError("WasherControls MaxRinses read Error", error); } SetCommandExitStatus(error); }]; @@ -40990,22 +40935,22 @@ class ReadTemperatureControlCurrentTemperatureLevelIndex : public ReadAttribute } }; -class SubscribeAttributeTemperatureControlCurrentTemperatureLevelIndex : public SubscribeAttribute { +class SubscribeAttributeWasherControlsMaxRinses : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlCurrentTemperatureLevelIndex() - : SubscribeAttribute("current-temperature-level-index") + SubscribeAttributeWasherControlsMaxRinses() + : SubscribeAttribute("max-rinses") { } - ~SubscribeAttributeTemperatureControlCurrentTemperatureLevelIndex() {} + ~SubscribeAttributeWasherControlsMaxRinses() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41016,12 +40961,861 @@ class SubscribeAttributeTemperatureControlCurrentTemperatureLevelIndex : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentTemperatureLevelIndexWithParams:params + [cluster subscribeAttributeMaxRinsesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.CurrentTemperatureLevelIndex response %@", [value description]); + NSLog(@"WasherControls.MaxRinses response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadWasherControlsGeneratedCommandList : public ReadAttribute { +public: + ReadWasherControlsGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadWasherControlsGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("WasherControls GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWasherControlsGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeWasherControlsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeWasherControlsGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AcceptedCommandList + */ +class ReadWasherControlsAcceptedCommandList : public ReadAttribute { +public: + ReadWasherControlsAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadWasherControlsAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("WasherControls AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWasherControlsAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeWasherControlsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeWasherControlsAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute EventList + */ +class ReadWasherControlsEventList : public ReadAttribute { +public: + ReadWasherControlsEventList() + : ReadAttribute("event-list") + { + } + + ~ReadWasherControlsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.EventList response %@", [value description]); + if (error != nil) { + LogNSError("WasherControls EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWasherControlsEventList : public SubscribeAttribute { +public: + SubscribeAttributeWasherControlsEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeWasherControlsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AttributeList + */ +class ReadWasherControlsAttributeList : public ReadAttribute { +public: + ReadWasherControlsAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadWasherControlsAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("WasherControls AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWasherControlsAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeWasherControlsAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeWasherControlsAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.AttributeList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FeatureMap + */ +class ReadWasherControlsFeatureMap : public ReadAttribute { +public: + ReadWasherControlsFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadWasherControlsFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("WasherControls FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWasherControlsFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeWasherControlsFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeWasherControlsFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.FeatureMap response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadWasherControlsClusterRevision : public ReadAttribute { +public: + ReadWasherControlsClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadWasherControlsClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.ClusterRevision response %@", [value description]); + if (error != nil) { + LogNSError("WasherControls ClusterRevision read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWasherControlsClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeWasherControlsClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeWasherControlsClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WasherControls.ClusterRevision response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/*----------------------------------------------------------------------------*\ +| Cluster TemperatureControl | 0x0056 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetTemperature | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TemperatureSetpoint | 0x0000 | +| * MinTemperature | 0x0001 | +| * MaxTemperature | 0x0002 | +| * Step | 0x0003 | +| * SelectedTemperatureLevel | 0x0004 | +| * SupportedTemperatureLevels | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command SetTemperature + */ +class TemperatureControlSetTemperature : public ClusterCommand { +public: + TemperatureControlSetTemperature() + : ClusterCommand("set-temperature") + { + AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); + AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000056) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.targetTemperature.HasValue()) { + params.targetTemperature = [NSNumber numberWithShort:mRequest.targetTemperature.Value()]; + } else { + params.targetTemperature = nil; + } + if (mRequest.targetTemperatureLevel.HasValue()) { + params.targetTemperatureLevel = [NSNumber numberWithUnsignedChar:mRequest.targetTemperatureLevel.Value()]; + } else { + params.targetTemperatureLevel = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; +}; + +/* + * Attribute TemperatureSetpoint + */ +class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { +public: + ReadTemperatureControlTemperatureSetpoint() + : ReadAttribute("temperature-setpoint") + { + } + + ~ReadTemperatureControlTemperatureSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTemperatureSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + if (error != nil) { + LogNSError("TemperatureControl TemperatureSetpoint read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTemperatureControlTemperatureSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeTemperatureControlTemperatureSetpoint() + : SubscribeAttribute("temperature-setpoint") + { + } + + ~SubscribeAttributeTemperatureControlTemperatureSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeTemperatureSetpointWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute MinTemperature + */ +class ReadTemperatureControlMinTemperature : public ReadAttribute { +public: + ReadTemperatureControlMinTemperature() + : ReadAttribute("min-temperature") + { + } + + ~ReadTemperatureControlMinTemperature() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000001) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + if (error != nil) { + LogNSError("TemperatureControl MinTemperature read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttribute { +public: + SubscribeAttributeTemperatureControlMinTemperature() + : SubscribeAttribute("min-temperature") + { + } + + ~SubscribeAttributeTemperatureControlMinTemperature() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMinTemperatureWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute MaxTemperature + */ +class ReadTemperatureControlMaxTemperature : public ReadAttribute { +public: + ReadTemperatureControlMaxTemperature() + : ReadAttribute("max-temperature") + { + } + + ~ReadTemperatureControlMaxTemperature() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000002) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); + if (error != nil) { + LogNSError("TemperatureControl MaxTemperature read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttribute { +public: + SubscribeAttributeTemperatureControlMaxTemperature() + : SubscribeAttribute("max-temperature") + { + } + + ~SubscribeAttributeTemperatureControlMaxTemperature() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMaxTemperatureWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute Step + */ +class ReadTemperatureControlStep : public ReadAttribute { +public: + ReadTemperatureControlStep() + : ReadAttribute("step") + { + } + + ~ReadTemperatureControlStep() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000003) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.Step response %@", [value description]); + if (error != nil) { + LogNSError("TemperatureControl Step read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { +public: + SubscribeAttributeTemperatureControlStep() + : SubscribeAttribute("step") + { + } + + ~SubscribeAttributeTemperatureControlStep() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000003) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeStepWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.Step response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SelectedTemperatureLevel + */ +class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { +public: + ReadTemperatureControlSelectedTemperatureLevel() + : ReadAttribute("selected-temperature-level") + { + } + + ~ReadTemperatureControlSelectedTemperatureLevel() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000004) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSelectedTemperatureLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); + if (error != nil) { + LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public SubscribeAttribute { +public: + SubscribeAttributeTemperatureControlSelectedTemperatureLevel() + : SubscribeAttribute("selected-temperature-level") + { + } + + ~SubscribeAttributeTemperatureControlSelectedTemperatureLevel() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000004) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSelectedTemperatureLevelWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41523,11 +42317,9 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr | Cluster RefrigeratorAlarm | 0x0057 | |------------------------------------------------------------------------------| | Commands: | | -| * Reset | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | | * Mask | 0x0000 | -| * Latch | 0x0001 | | * State | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -41540,58 +42332,6 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr | * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ -/* - * Command Reset - */ -class RefrigeratorAlarmReset : public ClusterCommand { -public: - RefrigeratorAlarmReset() - : ClusterCommand("reset") - { - AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); - AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRRefrigeratorAlarmClusterResetParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.alarms = [NSNumber numberWithUnsignedInt:mRequest.alarms.Raw()]; - if (mRequest.mask.HasValue()) { - params.mask = [NSNumber numberWithUnsignedInt:mRequest.mask.Value().Raw()]; - } else { - params.mask = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resetWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::RefrigeratorAlarm::Commands::Reset::Type mRequest; -}; - /* * Attribute Mask */ @@ -41623,46 +42363,6 @@ class ReadRefrigeratorAlarmMask : public ReadAttribute { } }; -class WriteRefrigeratorAlarmMask : public WriteAttribute { -public: - WriteRefrigeratorAlarmMask() - : WriteAttribute("mask") - { - AddArgument("attr-name", "mask"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRefrigeratorAlarmMask() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) WriteAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeMaskWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RefrigeratorAlarm Mask write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { public: SubscribeAttributeRefrigeratorAlarmMask() @@ -41702,76 +42402,6 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { } }; -/* - * Attribute Latch - */ -class ReadRefrigeratorAlarmLatch : public ReadAttribute { -public: - ReadRefrigeratorAlarmLatch() - : ReadAttribute("latch") - { - } - - ~ReadRefrigeratorAlarmLatch() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Latch response %@", [value description]); - if (error != nil) { - LogNSError("RefrigeratorAlarm Latch read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRefrigeratorAlarmLatch : public SubscribeAttribute { -public: - SubscribeAttributeRefrigeratorAlarmLatch() - : SubscribeAttribute("latch") - { - } - - ~SubscribeAttributeRefrigeratorAlarmLatch() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLatchWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Latch response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute State */ @@ -161845,6 +162475,43 @@ void registerClusterModeSelect(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterWasherControls(Commands & commands) +{ + using namespace chip::app::Clusters::WasherControls; + + const char * clusterName = "WasherControls"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterTemperatureControl(Commands & commands) { using namespace chip::app::Clusters::TemperatureControl; @@ -161865,8 +162532,8 @@ void registerClusterTemperatureControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -161893,15 +162560,11 @@ void registerClusterRefrigeratorAlarm(Commands & commands) commands_list clusterCommands = { make_unique(Id), // - make_unique(), // make_unique(Id), // make_unique(), // make_unique(Id), // - make_unique(), // make_unique(Id), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -166386,6 +167049,7 @@ void registerClusters(Commands & commands) registerClusterUserLabel(commands); registerClusterBooleanState(commands); registerClusterModeSelect(commands); + registerClusterWasherControls(commands); registerClusterTemperatureControl(commands); registerClusterRefrigeratorAlarm(commands); registerClusterAirQuality(commands); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 48f12352b38286..b84f964799fccb 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -112084,125 +112084,121 @@ class TestModeSelectCluster : public TestCommandBridge { err = TestReadDescription_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read StandardNamespace\n"); - err = TestReadStandardNamespace_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read SupportedModes\n"); + err = TestReadSupportedModes_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read SupportedModes\n"); - err = TestReadSupportedModes_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read CurrentMode\n"); + err = TestReadCurrentMode_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read CurrentMode\n"); - err = TestReadCurrentMode_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read StartUpMode\n"); + err = TestReadStartUpMode_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read StartUpMode\n"); - err = TestReadStartUpMode_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read OnMode\n"); + err = TestReadOnMode_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read OnMode\n"); - err = TestReadOnMode_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Change to Supported Mode\n"); + err = TestChangeToSupportedMode_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Change to Supported Mode\n"); - err = TestChangeToSupportedMode_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Verify Current Mode Change\n"); + err = TestVerifyCurrentModeChange_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Verify Current Mode Change\n"); - err = TestVerifyCurrentModeChange_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Change to Unsupported Mode\n"); + err = TestChangeToUnsupportedMode_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Change to Unsupported Mode\n"); - err = TestChangeToUnsupportedMode_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Toggle OnOff\n"); + err = TestToggleOnOff_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Toggle OnOff\n"); err = TestToggleOnOff_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Toggle OnOff\n"); - err = TestToggleOnOff_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Verify Current Mode does not change when OnMode is null\n"); + err = TestVerifyCurrentModeDoesNotChangeWhenOnModeIsNull_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Verify Current Mode does not change when OnMode is null\n"); - err = TestVerifyCurrentModeDoesNotChangeWhenOnModeIsNull_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Change to Unsupported OnMode\n"); + err = TestChangeToUnsupportedOnMode_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Change to Unsupported OnMode\n"); - err = TestChangeToUnsupportedOnMode_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Change OnMode\n"); + err = TestChangeOnMode_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Change OnMode\n"); - err = TestChangeOnMode_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Verify OnMode\n"); + err = TestVerifyOnMode_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Verify OnMode\n"); - err = TestVerifyOnMode_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Toggle OnOff\n"); + err = TestToggleOnOff_15(); break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Toggle OnOff\n"); err = TestToggleOnOff_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Toggle OnOff\n"); - err = TestToggleOnOff_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Verify Current Mode Changes if OnMode is not null\n"); + err = TestVerifyCurrentModeChangesIfOnModeIsNotNull_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Verify Current Mode Changes if OnMode is not null\n"); - err = TestVerifyCurrentModeChangesIfOnModeIsNotNull_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Change to Unsupported StartUp Mode\n"); + err = TestChangeToUnsupportedStartUpMode_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Change to Unsupported StartUp Mode\n"); - err = TestChangeToUnsupportedStartUpMode_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Change to Supported StartUp Mode\n"); + err = TestChangeToSupportedStartUpMode_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Change to Supported StartUp Mode\n"); - err = TestChangeToSupportedStartUpMode_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Verify StartUp Mode Change\n"); + err = TestVerifyStartUpModeChange_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Verify StartUp Mode Change\n"); - err = TestVerifyStartUpModeChange_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Change CurrentMode to another value\n"); + err = TestChangeCurrentModeToAnotherValue_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Change CurrentMode to another value\n"); - err = TestChangeCurrentModeToAnotherValue_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Change On Mode\n"); + err = TestChangeOnMode_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Change On Mode\n"); - err = TestChangeOnMode_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : Set StartUpOnOff\n"); + err = TestSetStartUpOnOff_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Set StartUpOnOff\n"); - err = TestSetStartUpOnOff_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : Reboot target device\n"); + err = TestRebootTargetDevice_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Reboot target device\n"); - err = TestRebootTargetDevice_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_26(); + ChipLogProgress( + chipTool, " ***** Test Step 26 : Verify Current Mode Change based on OnMode, as it overwrites StartUpMode\n"); + err = TestVerifyCurrentModeChangeBasedOnOnModeAsItOverwritesStartUpMode_26(); break; case 27: - ChipLogProgress( - chipTool, " ***** Test Step 27 : Verify Current Mode Change based on OnMode, as it overwrites StartUpMode\n"); - err = TestVerifyCurrentModeChangeBasedOnOnModeAsItOverwritesStartUpMode_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : Change On Mode to Null\n"); + err = TestChangeOnModeToNull_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Change On Mode to Null\n"); - err = TestChangeOnModeToNull_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Reboot target device\n"); + err = TestRebootTargetDevice_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Reboot target device\n"); - err = TestRebootTargetDevice_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Verify Current Mode Change based on new StartUp Mode\n"); - err = TestVerifyCurrentModeChangeBasedOnNewStartUpMode_31(); + ChipLogProgress(chipTool, " ***** Test Step 30 : Verify Current Mode Change based on new StartUp Mode\n"); + err = TestVerifyCurrentModeChangeBasedOnNewStartUpMode_30(); break; } @@ -112240,10 +112236,10 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -112252,10 +112248,10 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -112270,10 +112266,10 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -112308,9 +112304,6 @@ class TestModeSelectCluster : public TestCommandBridge { case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -112324,7 +112317,7 @@ class TestModeSelectCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 32; + const uint16_t mTestCount = 31; chip::Optional mNodeId; chip::Optional mCluster; @@ -112362,31 +112355,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadStandardNamespace_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read StandardNamespace Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("StandardNamespace", actualValue)); - VerifyOrReturn(CheckValue("StandardNamespace", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadSupportedModes_3() + CHIP_ERROR TestReadSupportedModes_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112404,31 +112373,28 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturn( CheckValueAsString("Label", ((MTRModeSelectClusterModeOptionStruct *) actualValue[0]).label, @"Black")); VerifyOrReturn(CheckValue("Mode", ((MTRModeSelectClusterModeOptionStruct *) actualValue[0]).mode, 0U)); - VerifyOrReturn(CheckValue("SemanticTags", - [((MTRModeSelectClusterModeOptionStruct *) actualValue[0]).semanticTags count], static_cast(1))); + VerifyOrReturn(CheckValue("ModeTags", [((MTRModeSelectClusterModeOptionStruct *) actualValue[0]).modeTags count], + static_cast(1))); VerifyOrReturn(CheckValue("Value", - ((MTRModeSelectClusterSemanticTagStruct *) ((MTRModeSelectClusterModeOptionStruct *) actualValue[0]) - .semanticTags[0]) + ((MTRModeSelectClusterModeTagStruct *) ((MTRModeSelectClusterModeOptionStruct *) actualValue[0]).modeTags[0]) .value, 0U)); VerifyOrReturn( CheckValueAsString("Label", ((MTRModeSelectClusterModeOptionStruct *) actualValue[1]).label, @"Cappuccino")); VerifyOrReturn(CheckValue("Mode", ((MTRModeSelectClusterModeOptionStruct *) actualValue[1]).mode, 4U)); - VerifyOrReturn(CheckValue("SemanticTags", - [((MTRModeSelectClusterModeOptionStruct *) actualValue[1]).semanticTags count], static_cast(1))); + VerifyOrReturn(CheckValue("ModeTags", [((MTRModeSelectClusterModeOptionStruct *) actualValue[1]).modeTags count], + static_cast(1))); VerifyOrReturn(CheckValue("Value", - ((MTRModeSelectClusterSemanticTagStruct *) ((MTRModeSelectClusterModeOptionStruct *) actualValue[1]) - .semanticTags[0]) + ((MTRModeSelectClusterModeTagStruct *) ((MTRModeSelectClusterModeOptionStruct *) actualValue[1]).modeTags[0]) .value, 0U)); VerifyOrReturn( CheckValueAsString("Label", ((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).label, @"Espresso")); VerifyOrReturn(CheckValue("Mode", ((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).mode, 7U)); - VerifyOrReturn(CheckValue("SemanticTags", - [((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).semanticTags count], static_cast(1))); + VerifyOrReturn(CheckValue("ModeTags", [((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).modeTags count], + static_cast(1))); VerifyOrReturn(CheckValue("Value", - ((MTRModeSelectClusterSemanticTagStruct *) ((MTRModeSelectClusterModeOptionStruct *) actualValue[2]) - .semanticTags[0]) + ((MTRModeSelectClusterModeTagStruct *) ((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).modeTags[0]) .value, 0U)); } @@ -112442,7 +112408,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadCurrentMode_4() + CHIP_ERROR TestReadCurrentMode_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112465,7 +112431,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadStartUpMode_5() + CHIP_ERROR TestReadStartUpMode_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112489,7 +112455,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOnMode_6() + CHIP_ERROR TestReadOnMode_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112512,7 +112478,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeToSupportedMode_7() + CHIP_ERROR TestChangeToSupportedMode_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112534,7 +112500,7 @@ class TestModeSelectCluster : public TestCommandBridge { } NSNumber * _Nonnull currentModeBeforeToggle; - CHIP_ERROR TestVerifyCurrentModeChange_8() + CHIP_ERROR TestVerifyCurrentModeChange_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112560,7 +112526,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeToUnsupportedMode_9() + CHIP_ERROR TestChangeToUnsupportedMode_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112584,7 +112550,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestToggleOnOff_10() + CHIP_ERROR TestToggleOnOff_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112602,7 +112568,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestToggleOnOff_11() + CHIP_ERROR TestToggleOnOff_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112620,7 +112586,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCurrentModeDoesNotChangeWhenOnModeIsNull_12() + CHIP_ERROR TestVerifyCurrentModeDoesNotChangeWhenOnModeIsNull_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112643,7 +112609,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeToUnsupportedOnMode_13() + CHIP_ERROR TestChangeToUnsupportedOnMode_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112668,7 +112634,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeOnMode_14() + CHIP_ERROR TestChangeOnMode_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112690,7 +112656,7 @@ class TestModeSelectCluster : public TestCommandBridge { } NSNumber * _Nullable OnModeValue; - CHIP_ERROR TestVerifyOnMode_15() + CHIP_ERROR TestVerifyOnMode_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112717,7 +112683,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestToggleOnOff_16() + CHIP_ERROR TestToggleOnOff_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112735,7 +112701,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestToggleOnOff_17() + CHIP_ERROR TestToggleOnOff_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112753,7 +112719,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCurrentModeChangesIfOnModeIsNotNull_18() + CHIP_ERROR TestVerifyCurrentModeChangesIfOnModeIsNotNull_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112776,7 +112742,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeToUnsupportedStartUpMode_19() + CHIP_ERROR TestChangeToUnsupportedStartUpMode_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112801,7 +112767,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeToSupportedStartUpMode_20() + CHIP_ERROR TestChangeToSupportedStartUpMode_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112822,7 +112788,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyStartUpModeChange_21() + CHIP_ERROR TestVerifyStartUpModeChange_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112846,7 +112812,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeCurrentModeToAnotherValue_22() + CHIP_ERROR TestChangeCurrentModeToAnotherValue_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112867,7 +112833,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeOnMode_23() + CHIP_ERROR TestChangeOnMode_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112888,7 +112854,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSetStartUpOnOff_24() + CHIP_ERROR TestSetStartUpOnOff_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112909,14 +112875,14 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRebootTargetDevice_25() + CHIP_ERROR TestRebootTargetDevice_24() { chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_26() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_25() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -112924,7 +112890,7 @@ class TestModeSelectCluster : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestVerifyCurrentModeChangeBasedOnOnModeAsItOverwritesStartUpMode_27() + CHIP_ERROR TestVerifyCurrentModeChangeBasedOnOnModeAsItOverwritesStartUpMode_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112947,7 +112913,7 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestChangeOnModeToNull_28() + CHIP_ERROR TestChangeOnModeToNull_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -112968,14 +112934,14 @@ class TestModeSelectCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRebootTargetDevice_29() + CHIP_ERROR TestRebootTargetDevice_28() { chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_30() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_29() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -112983,7 +112949,7 @@ class TestModeSelectCluster : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestVerifyCurrentModeChangeBasedOnNewStartUpMode_31() + CHIP_ERROR TestVerifyCurrentModeChangeBasedOnNewStartUpMode_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -143887,160 +143853,164 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { err = TestKeySetRead_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Write Group Keys (invalid)\n"); - err = TestWriteGroupKeysInvalid_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : KeySet Read All Indices\n"); + err = TestKeySetReadAllIndices_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Write Group Keys (too many)\n"); - err = TestWriteGroupKeysTooMany_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Write Group Keys (invalid)\n"); + err = TestWriteGroupKeysInvalid_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Write Group Keys on alpha\n"); - err = TestWriteGroupKeysOnAlpha_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Write Group Keys (too many)\n"); + err = TestWriteGroupKeysTooMany_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Write Group Keys on beta\n"); - err = TestWriteGroupKeysOnBeta_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Write Group Keys on alpha\n"); + err = TestWriteGroupKeysOnAlpha_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read Group Keys on alpha\n"); - err = TestReadGroupKeysOnAlpha_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Write Group Keys on beta\n"); + err = TestWriteGroupKeysOnBeta_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read Group Keys on alpha without fabric filtering\n"); - err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Read Group Keys on alpha\n"); + err = TestReadGroupKeysOnAlpha_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read Group Keys on beta\n"); - err = TestReadGroupKeysOnBeta_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Read Group Keys on alpha without fabric filtering\n"); + err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read Group Keys on beta without fabric filtering\n"); - err = TestReadGroupKeysOnBetaWithoutFabricFiltering_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Read Group Keys on beta\n"); + err = TestReadGroupKeysOnBeta_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Add Group 1\n"); - err = TestAddGroup1_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Read Group Keys on beta without fabric filtering\n"); + err = TestReadGroupKeysOnBetaWithoutFabricFiltering_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Add Group 2\n"); - err = TestAddGroup2_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Add Group 1\n"); + err = TestAddGroup1_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Add Group 3\n"); - err = TestAddGroup3_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Add Group 2\n"); + err = TestAddGroup2_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Add Group 4\n"); - err = TestAddGroup4_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : Add Group 3\n"); + err = TestAddGroup3_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Add Group 5\n"); - err = TestAddGroup5_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : Add Group 4\n"); + err = TestAddGroup4_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read GroupTable from alpha\n"); - err = TestReadGroupTableFromAlpha_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : Add Group 5\n"); + err = TestAddGroup5_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read GroupTable from alpha without fabric filtering\n"); - err = TestReadGroupTableFromAlphaWithoutFabricFiltering_26(); + ChipLogProgress(chipTool, " ***** Test Step 26 : Read GroupTable from alpha\n"); + err = TestReadGroupTableFromAlpha_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read GroupTable from beta\n"); - err = TestReadGroupTableFromBeta_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : Read GroupTable from alpha without fabric filtering\n"); + err = TestReadGroupTableFromAlphaWithoutFabricFiltering_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read GroupTable from beta without fabric filtering\n"); - err = TestReadGroupTableFromBetaWithoutFabricFiltering_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Read GroupTable from beta\n"); + err = TestReadGroupTableFromBeta_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : KeySet Remove 1\n"); - err = TestKeySetRemove1_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Read GroupTable from beta without fabric filtering\n"); + err = TestReadGroupTableFromBetaWithoutFabricFiltering_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : KeySet Read (removed)\n"); - err = TestKeySetReadRemoved_30(); + ChipLogProgress(chipTool, " ***** Test Step 30 : KeySet Remove 1\n"); + err = TestKeySetRemove1_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : KeySet Read (not removed) CacheAndSync\n"); + ChipLogProgress(chipTool, " ***** Test Step 31 : KeySet Read (removed)\n"); + err = TestKeySetReadRemoved_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : KeySet Read (not removed) CacheAndSync\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetReadNotRemovedCacheAndSync_31(); + err = TestKeySetReadNotRemovedCacheAndSync_32(); break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : KeySet Read (not removed) TrustFirst\n"); + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : KeySet Read (not removed) TrustFirst\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetReadNotRemovedTrustFirst_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Remove Group 1\n"); - err = TestRemoveGroup1_33(); + err = TestKeySetReadNotRemovedTrustFirst_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read GroupTable 2\n"); - err = TestReadGroupTable2_34(); + ChipLogProgress(chipTool, " ***** Test Step 34 : Remove Group 1\n"); + err = TestRemoveGroup1_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Remove All\n"); - err = TestRemoveAll_35(); + ChipLogProgress(chipTool, " ***** Test Step 35 : Read GroupTable 2\n"); + err = TestReadGroupTable2_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read GroupTable 3\n"); - err = TestReadGroupTable3_36(); + ChipLogProgress(chipTool, " ***** Test Step 36 : Remove All\n"); + err = TestRemoveAll_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : KeySet Remove 2\n"); - err = TestKeySetRemove2_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Read GroupTable 3\n"); + err = TestReadGroupTable3_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : KeySet Read (also removed)\n"); - err = TestKeySetReadAlsoRemoved_38(); + ChipLogProgress(chipTool, " ***** Test Step 38 : KeySet Remove 2\n"); + err = TestKeySetRemove2_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : KeySet Write 1\n"); - err = TestKeySetWrite1_39(); + ChipLogProgress(chipTool, " ***** Test Step 39 : KeySet Read (also removed)\n"); + err = TestKeySetReadAlsoRemoved_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : KeySet Write 2 CacheAndSync\n"); + ChipLogProgress(chipTool, " ***** Test Step 40 : KeySet Write 1\n"); + err = TestKeySetWrite1_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : KeySet Write 2 CacheAndSync\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2CacheAndSync_40(); + err = TestKeySetWrite2CacheAndSync_41(); break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : KeySet Write 2 TrustFirst\n"); + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : KeySet Write 2 TrustFirst\n"); if (ShouldSkip("!GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2TrustFirst_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); - err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_42(); + err = TestKeySetWrite2TrustFirst_42(); break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Remove keyset 1\n"); - err = TestRemoveKeyset1_43(); + ChipLogProgress(chipTool, " ***** Test Step 43 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); + err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_43(); break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_44(); + ChipLogProgress(chipTool, " ***** Test Step 44 : Remove keyset 1\n"); + err = TestRemoveKeyset1_44(); break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Remove keyset 2\n"); - err = TestRemoveKeyset2_45(); + ChipLogProgress(chipTool, " ***** Test Step 45 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_45(); break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_46(); + ChipLogProgress(chipTool, " ***** Test Step 46 : Remove keyset 2\n"); + err = TestRemoveKeyset2_46(); + break; + case 47: + ChipLogProgress(chipTool, " ***** Test Step 47 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_47(); break; } @@ -144090,13 +144060,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -144144,10 +144114,10 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -144168,10 +144138,10 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -144194,6 +144164,9 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -144207,7 +144180,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 47; + const uint16_t mTestCount = 48; chip::Optional mNodeId; chip::Optional mCluster; @@ -144558,7 +144531,32 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysInvalid_12() + CHIP_ERROR TestKeySetReadAllIndices_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster keySetReadAllIndicesWithCompletion:^( + MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"KeySet Read All Indices Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 417U)); + VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 418U)); + VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 0U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteGroupKeysInvalid_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144593,7 +144591,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysTooMany_13() + CHIP_ERROR TestWriteGroupKeysTooMany_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144693,7 +144691,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnAlpha_14() + CHIP_ERROR TestWriteGroupKeysOnAlpha_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144739,7 +144737,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnBeta_15() + CHIP_ERROR TestWriteGroupKeysOnBeta_16() { MTRBaseDevice * device = GetDevice("beta"); @@ -144785,7 +144783,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlpha_16() + CHIP_ERROR TestReadGroupKeysOnAlpha_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144847,7 +144845,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_17() + CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -144941,7 +144939,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBeta_18() + CHIP_ERROR TestReadGroupKeysOnBeta_19() { MTRBaseDevice * device = GetDevice("beta"); @@ -145003,7 +145001,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_19() + CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_20() { MTRBaseDevice * device = GetDevice("beta"); @@ -145097,7 +145095,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup1_20() + CHIP_ERROR TestAddGroup1_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145129,7 +145127,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup2_21() + CHIP_ERROR TestAddGroup2_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145161,7 +145159,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup3_22() + CHIP_ERROR TestAddGroup3_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145193,7 +145191,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup4_23() + CHIP_ERROR TestAddGroup4_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145225,7 +145223,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup5_24() + CHIP_ERROR TestAddGroup5_25() { MTRBaseDevice * device = GetDevice("beta"); @@ -145257,7 +145255,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlpha_25() + CHIP_ERROR TestReadGroupTableFromAlpha_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145346,7 +145344,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_26() + CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145450,7 +145448,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBeta_27() + CHIP_ERROR TestReadGroupTableFromBeta_28() { MTRBaseDevice * device = GetDevice("beta"); @@ -145494,7 +145492,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_28() + CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_29() { MTRBaseDevice * device = GetDevice("beta"); @@ -145598,7 +145596,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove1_29() + CHIP_ERROR TestKeySetRemove1_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145621,7 +145619,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadRemoved_30() + CHIP_ERROR TestKeySetReadRemoved_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145648,7 +145646,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_31() + CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_32() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145699,7 +145697,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_32() + CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145750,7 +145748,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveGroup1_33() + CHIP_ERROR TestRemoveGroup1_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145781,7 +145779,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable2_34() + CHIP_ERROR TestReadGroupTable2_35() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145855,7 +145853,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveAll_35() + CHIP_ERROR TestRemoveAll_36() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145873,7 +145871,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable3_36() + CHIP_ERROR TestReadGroupTable3_37() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145902,7 +145900,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove2_37() + CHIP_ERROR TestKeySetRemove2_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145925,7 +145923,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadAlsoRemoved_38() + CHIP_ERROR TestKeySetReadAlsoRemoved_39() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145952,7 +145950,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite1_39() + CHIP_ERROR TestKeySetWrite1_40() { MTRBaseDevice * device = GetDevice("alpha"); @@ -145992,7 +145990,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2CacheAndSync_40() + CHIP_ERROR TestKeySetWrite2CacheAndSync_41() { MTRBaseDevice * device = GetDevice("alpha"); @@ -146032,7 +146030,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2TrustFirst_41() + CHIP_ERROR TestKeySetWrite2TrustFirst_42() { MTRBaseDevice * device = GetDevice("alpha"); @@ -146072,7 +146070,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_42() + CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_43() { MTRBaseDevice * device = GetDevice("alpha"); @@ -146113,7 +146111,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset1_43() + CHIP_ERROR TestRemoveKeyset1_44() { MTRBaseDevice * device = GetDevice("alpha"); @@ -146136,7 +146134,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_44() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_45() { MTRBaseDevice * device = GetDevice("alpha"); @@ -146174,7 +146172,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset2_45() + CHIP_ERROR TestRemoveKeyset2_46() { MTRBaseDevice * device = GetDevice("alpha"); @@ -146197,7 +146195,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_46() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_47() { MTRBaseDevice * device = GetDevice("alpha");