diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 2061c3a630bccb..e7f2686627524c 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -54,7 +54,7 @@ AmebaZ amebaz2 announcementReason AnnounceOTAProvider -AnnounceOtaProviderRequest +AnnounceOTAProviderRequest APIs apk AppConfig diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 178210ae842f62..32db085151c081 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -621,12 +621,12 @@ "mbed-CY8CPROTO_062_4343W-shell-debug", "mbed-CY8CPROTO_062_4343W-shell-develop", "mbed-CY8CPROTO_062_4343W-shell-release", - "nrf-nrf52840-light", - "nrf-nrf52840-light-rpc", - "nrf-nrf52840-lock", - "nrf-nrf52840-pump", - "nrf-nrf52840-pump-controller", - "nrf-nrf52840-shell", + "nrf-nrf52840dk-light", + "nrf-nrf52840dk-light-rpc", + "nrf-nrf52840dk-lock", + "nrf-nrf52840dk-pump", + "nrf-nrf52840dk-pump-controller", + "nrf-nrf52840dk-shell", "nrf-nrf5340-light", "nrf-nrf5340-light-rpc", "nrf-nrf5340-lock", diff --git a/config/nrfconnect/chip-module/Kconfig b/config/nrfconnect/chip-module/Kconfig index d8247813838e68..4b477d357287d1 100644 --- a/config/nrfconnect/chip-module/Kconfig +++ b/config/nrfconnect/chip-module/Kconfig @@ -169,3 +169,11 @@ config CHIP_FACTORY_RESET_ERASE_NVS default y if CHIP_FACTORY_DATA || CHIP_FACTORY_DATA_CUSTOM_BACKEND endif + +config CHIP_LOG_SIZE_OPTIMIZATION + bool "Disable some detailed logs to decrease flash usage" + help + Disables some log levels for the specific log modules + providing detailed information that are not used in most cases. + You can find full configuration enabled by this option + in the platform/nrfconnect/CHIPPlatformConfig.h file. diff --git a/config/nrfconnect/chip-module/Kconfig.defaults b/config/nrfconnect/chip-module/Kconfig.defaults index f24fc4608b4122..88519293b67d77 100644 --- a/config/nrfconnect/chip-module/Kconfig.defaults +++ b/config/nrfconnect/chip-module/Kconfig.defaults @@ -21,7 +21,6 @@ if CHIP config LOG - bool default y if LOG @@ -35,144 +34,131 @@ choice MATTER_LOG_LEVEL_CHOICE endchoice config LOG_DEFAULT_LEVEL - int default 2 +config CHIP_LOG_SIZE_OPTIMIZATION + default y + endif config PRINTK_SYNC - bool default y config ASSERT - bool default y config HW_STACK_PROTECTION - bool default y config FPU - bool default y config SHELL - bool default y +config PTHREAD_IPC + bool + default n + # Generic networking options config NET_SOCKETS_POSIX_NAMES - bool default n # Application stack size config MAIN_STACK_SIZE - int default 8192 config INIT_STACKS - bool default y # Disable certain parts of Zephyr IPv6 stack config NET_IPV6_NBR_CACHE - bool default n config NET_IPV6_MLD - bool default y config NET_IF_MCAST_IPV6_ADDR_COUNT - int default 14 # Network buffers config NET_PKT_RX_COUNT - int default 16 config NET_PKT_TX_COUNT - int default 16 config NET_BUF_RX_COUNT - int default 80 config NET_BUF_TX_COUNT - int default 80 # Bluetooth Low Energy configs config BT - bool default y config BT_PERIPHERAL - bool default y config BT_PERIPHERAL_PREF_MIN_INT - int default 36 config BT_PERIPHERAL_PREF_MAX_INT - int default 36 config BT_GAP_AUTO_UPDATE_CONN_PARAMS - bool default y config BT_GATT_DYNAMIC_DB - bool default y config BT_DEVICE_NAME_DYNAMIC - bool default y config BT_DEVICE_NAME_MAX - int default 15 config BT_MAX_CONN - int default 1 config BT_L2CAP_TX_MTU - int default 247 config BT_BUF_ACL_RX_SIZE - int default 251 config BT_BUF_ACL_TX_SIZE - int default 251 config BT_RX_STACK_SIZE - int default 1200 +config BT_CTLR_ECDH + bool + default n + +config BT_CTLR_LE_ENC + bool + default n + +config BT_DEVICE_NAME_GATT_WRITABLE + bool + default n + # Enable NFC support config CHIP_NFC_COMMISSIONING - bool default y config CHIP_OTA_REQUESTOR - bool default y # All boards besides nRF7002DK use QSPI NOR external flash if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 config CHIP_QSPI_NOR - bool default y endif # BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 @@ -182,35 +168,29 @@ endif # BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 if BOARD_NRF7002DK_NRF5340_CPUAPP config CHIP_SPI_NOR - bool default y endif # BOARD_NRF7002DK_NRF5340_CPUAPP # Enable extended discovery config CHIP_EXTENDED_DISCOVERY - bool default y config NVS_LOOKUP_CACHE - bool default y config NVS_LOOKUP_CACHE_SIZE - int default 512 # Enable OpenThread config NET_L2_OPENTHREAD - bool default y if !WIFI_NRF700X if NET_L2_OPENTHREAD # Increase the default RX stack size config IEEE802154_NRF5_RX_STACK_SIZE - int default 1024 endif @@ -218,50 +198,39 @@ endif if CHIP_WIFI config NRF_WIFI_LOW_POWER - bool default n config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG - bool default n config SYSTEM_WORKQUEUE_STACK_SIZE - int default 1120 # align these numbers to match the OpenThread config config NET_IF_UNICAST_IPV6_ADDR_COUNT - int default 6 config NET_IF_MCAST_IPV6_ADDR_COUNT - int default 8 config NET_SOCKETS_POSIX_NAMES - bool default n config MBEDTLS_SSL_OUT_CONTENT_LEN - int default 900 # options managed by IP4/IP6 simultaneous support # aligned here to match OpenThread config config NET_MAX_ROUTERS - int default 1 config NET_MAX_CONN - int default 4 config SHELL_STACK_SIZE - int default 2616 config HEAP_MEM_POOL_SIZE - int default 200000 endif @@ -274,183 +243,139 @@ choice OPENTHREAD_SECURITY endchoice config PSA_CRYPTO_DRIVER_CC3XX - bool default n config OBERON_BACKEND - bool default y config MBEDTLS_ENABLE_HEAP - bool default y config MBEDTLS_HEAP_SIZE - int default 15360 config MBEDTLS_TLS_LIBRARY - bool default y config NRF_SECURITY_ADVANCED - bool default y config MBEDTLS_AES_C - bool default y config MBEDTLS_ECP_C - bool default y config MBEDTLS_ECP_DP_SECP256R1_ENABLED - bool default y config MBEDTLS_CTR_DRBG_C - bool default y config MBEDTLS_CIPHER_MODE_CTR - bool default y config MBEDTLS_ECJPAKE_C - bool default y config MBEDTLS_SHA256_C - bool default y config MBEDTLS_PK_C - bool default y config MBEDTLS_PK_WRITE_C - bool default y config MBEDTLS_X509_CREATE_C - bool default y if !CHIP_CRYPTO_PSA config MBEDTLS_X509_CSR_WRITE_C - bool default y if !CHIP_CRYPTO_PSA # Disable unneeded crypto operations config MBEDTLS_SHA384_C - bool default n config MBEDTLS_SHA512_C - bool default n config MBEDTLS_CIPHER_MODE_XTS - bool default n config MBEDTLS_CHACHA20_C - bool default n config MBEDTLS_POLY1305_C - bool default n config MBEDTLS_CHACHAPOLY_C - bool default n config MBEDTLS_GCM_C - bool default n config MBEDTLS_RSA_C - bool default n config PSA_WANT_KEY_TYPE_ARIA - bool default n config PSA_WANT_KEY_TYPE_CHACHA20 - bool default n config PSA_WANT_ALG_GCM - bool default n config PSA_WANT_ALG_CHACHA20_POLY1305 - bool default n config PSA_WANT_ALG_SHA_1 - bool default n config PSA_WANT_ALG_SHA_224 - bool default n config PSA_WANT_ALG_SHA_384 - bool default n config PSA_WANT_ALG_SHA_512 - bool default n config PSA_WANT_ALG_RIPEMD160 - bool default n config PSA_WANT_ALG_MD5 - bool default n config PSA_WANT_ALG_CFB - bool default n config PSA_WANT_ALG_OFB - bool default n # Disable not used shell modules config SENSOR_SHELL - bool default n config DEVICE_SHELL - bool default n config DATE_SHELL - bool default n config DEVMEM_SHELL - bool default n config MCUBOOT_SHELL - bool default n config CLOCK_CONTROL_NRF_SHELL - bool default n config FLASH_SHELL - bool default n # SoC series related configuration @@ -459,7 +384,6 @@ if SOC_SERIES_NRF52X # Increase maximum data length of PDU supported in the Controller config BT_CTLR_DATA_LENGTH_MAX - int default 251 endif # SOC_SERIES_NRF52X @@ -467,7 +391,6 @@ endif # SOC_SERIES_NRF52X if SOC_SERIES_NRF53X config UPDATEABLE_IMAGE_NUMBER - int default 2 # Generate random numbers using Xoroshiro algorithm instead of direct calls diff --git a/config/nrfconnect/chip-module/Kconfig.features b/config/nrfconnect/chip-module/Kconfig.features index 918a82685cad02..662d7074ebe0b3 100644 --- a/config/nrfconnect/chip-module/Kconfig.features +++ b/config/nrfconnect/chip-module/Kconfig.features @@ -49,11 +49,9 @@ config CHIP_QSPI_NOR if CHIP_QSPI_NOR config NORDIC_QSPI_NOR - bool default y config NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE - int default 16 endif # CHIP_QSPI_NOR @@ -71,7 +69,6 @@ config CHIP_SPI_NOR if CHIP_SPI_NOR config SPI_NOR_FLASH_LAYOUT_PAGE_SIZE - int default 4096 endif # CHIP_SPI_NOR @@ -96,41 +93,33 @@ if CHIP_DFU_OVER_BT_SMP # MCU Manager and SMP configuration config MCUMGR_SMP_BT_AUTHEN - bool default n config MCUMGR_BUF_COUNT - int default 6 # Increase BT MTU and RX buffer for big size DFU messages config BT_L2CAP_TX_MTU - int default 498 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 - int default 1024 # Increase system workqueue size, as SMP is processed within it config SYSTEM_WORKQUEUE_STACK_SIZE - int default 2800 if SOC_SERIES_NRF53X # Enable custom SMP request to erase settings partition. config MCUMGR_GRP_ZEPHYR_BASIC - bool default y config MCUMGR_GRP_BASIC_CMD_STORAGE_ERASE - bool default y endif # SOC_SERIES_NRF53X diff --git a/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults b/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults index 8069d710047338..83290b2b492f28 100644 --- a/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults +++ b/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults @@ -17,83 +17,63 @@ # The purpose of this file is to define new default values of settings used when building hci_rpmsg child image for Matter samples. config LOG - bool default n config HEAP_MEM_POOL_SIZE - int default 8192 config MAIN_STACK_SIZE - int default 2048 config SYSTEM_WORKQUEUE_STACK_SIZE - int default 2048 config BT - bool default y config BT_HCI_RAW - bool default y config BT_MAX_CONN - int default 1 config BT_PERIPHERAL - bool default y config BT_CENTRAL - bool default n config BT_BUF_ACL_RX_SIZE - int default 502 config BT_BUF_ACL_TX_SIZE - int default 251 config BT_CTLR_DATA_LENGTH_MAX - int default 251 config BT_CTLR_ASSERT_HANDLER - bool default y config BT_HCI_RAW_RESERVE - int default 1 # Workaround: Unable to allocate command buffer when using K_NO_WAIT since # Host number of completed commands does not follow normal flow control. config BT_BUF_CMD_TX_COUNT - int default 10 config ASSERT - bool default y config DEBUG_INFO - bool default y config EXCEPTION_STACK_TRACE - bool default y config IPC_SERVICE - bool default y config MBOX - bool default y diff --git a/config/nrfconnect/chip-module/Kconfig.mcuboot.defaults b/config/nrfconnect/chip-module/Kconfig.mcuboot.defaults index b9c6dce1982fb7..72169ca50afd8e 100644 --- a/config/nrfconnect/chip-module/Kconfig.mcuboot.defaults +++ b/config/nrfconnect/chip-module/Kconfig.mcuboot.defaults @@ -17,50 +17,39 @@ # The purpose of this file is to define new default values of settings used when building mcuboot child image for Matter samples. config MAIN_STACK_SIZE - int default 10240 config BOOT_SWAP_SAVE_ENCTLV - bool default n config BOOT_ENCRYPT_RSA - bool default n config BOOT_ENCRYPT_EC256 - bool default n config BOOT_ENCRYPT_X25519 - bool default n config BOOT_BOOTSTRAP - bool default n config PM - bool default n config FLASH - bool default y config FPROTECT - bool default y # nRF7002DK uses SPI NOR external flash if BOARD_NRF7002DK_NRF5340_CPUAPP config SPI - bool default y config SPI_NOR - bool default y choice SPI_NOR_SFDP @@ -68,15 +57,12 @@ choice SPI_NOR_SFDP endchoice config SPI_NOR_FLASH_LAYOUT_PAGE_SIZE - int default 4096 config MULTITHREADING - bool default y config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK - bool default y endif @@ -85,68 +71,53 @@ endif if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 config NORDIC_QSPI_NOR - bool default y config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE - int default 4096 config NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE - int default 16 endif config BOOT_MAX_IMG_SECTORS - int default 256 config LOG - bool default n config CONSOLE_HANDLER - bool default n config BOOT_BANNER - bool default n config TIMESLICING - bool default n config RESET_ON_FATAL_ERROR - bool default n config MULTITHREADING - bool default n config TICKLESS_KERNEL - bool default n config TIMEOUT_64BIT - bool default n config NRF_ENABLE_ICACHE - bool default n if SOC_SERIES_NRF53X # The following configurations are required to support simultaneous multi image update config PCD_APP - bool default y config UPDATEABLE_IMAGE_NUMBER - int default 2 # Multi-image updates do not support image swapping yet. @@ -157,24 +128,19 @@ endchoice # The network core cannot access external flash directly. The flash simulator must be used to # provide a memory region that is used to forward the new firmware to the network core. config FLASH_SIMULATOR - bool default y config FLASH_SIMULATOR_DOUBLE_WRITES - bool default y config FLASH_SIMULATOR_STATS - bool default n # Enable custom command to erase settings partition. config ENABLE_MGMT_PERUSER - bool default y config BOOT_MGMT_CUSTOM_STORAGE_ERASE - bool 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 18d3e7889ae1a2..9fee38cb5f38fc 100644 --- a/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults +++ b/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults @@ -17,87 +17,66 @@ # The purpose of this file is to define new default values of settings used when building multiprotocol_rpmsg child image for Matter samples. config LOG - bool default n config HEAP_MEM_POOL_SIZE - int default 8192 config MAIN_STACK_SIZE - int default 2048 config SYSTEM_WORKQUEUE_STACK_SIZE - int default 2048 config BT - bool default y config BT_HCI_RAW - bool default y config BT_MAX_CONN - int default 1 config BT_PERIPHERAL - bool default y config BT_CENTRAL - bool default n config BT_BUF_ACL_RX_SIZE - int default 502 config BT_BUF_ACL_TX_SIZE - int default 251 config BT_CTLR_DATA_LENGTH_MAX - int default 251 config BT_CTLR_ASSERT_HANDLER - bool default y config BT_HCI_RAW_RESERVE - int default 1 # Workaround: Unable to allocate command buffer when using K_NO_WAIT since # Host number of completed commands does not follow normal flow control. config BT_BUF_CMD_TX_COUNT - int default 10 config ASSERT - bool default y config DEBUG_INFO - bool default y config EXCEPTION_STACK_TRACE - bool default y config NRF_802154_SER_RADIO - bool default y config NRF_RTC_TIMER_USER_CHAN_COUNT - int default 2 config NRF_802154_ENCRYPTION - bool default y diff --git a/docs/guides/access-control-guide.md b/docs/guides/access-control-guide.md index 53275f6308ed08..d82ec309b8b8b9 100644 --- a/docs/guides/access-control-guide.md +++ b/docs/guides/access-control-guide.md @@ -378,15 +378,15 @@ strongly typed values: The privileges are: -- Clusters.AccessControl.Enums.Privilege.kView -- Clusters.AccessControl.Enums.Privilege.kOperate -- Clusters.AccessControl.Enums.Privilege.kManage -- Clusters.AccessControl.Enums.Privilege.kAdminister +- `Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView` +- `Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kOperate` +- `Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kManage` +- `Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister` The authentication modes are: -- Clusters.AccessControl.Enums.AuthMode.kCASE -- Clusters.AccessControl.Enums.AuthMode.kGroup +- `Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCASE` +- `Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kGroup` Some typical clusters: @@ -433,14 +433,14 @@ await devCtrl.ReadAttribute(1, [ (0, Clusters.AccessControl.Attributes.Acl ) ] ) ``` await devCtrl.WriteAttribute(1, [ (0, Clusters.AccessControl.Attributes.Acl( [ - Clusters.AccessControl.Structs.AccessControlEntry( - privilege = Clusters.AccessControl.Enums.Privilege.kAdminister, - authMode = Clusters.AccessControl.Enums.AuthMode.kCase, + Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, + authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects = [ 1 ] ), - Clusters.AccessControl.Structs.AccessControlEntry( - privilege = Clusters.AccessControl.Enums.Privilege.kView, - authMode = Clusters.AccessControl.Enums.AuthMode.kCase, + Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, + authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects = [ 4444, 5555, 6666 ], ), ] ) ) ] ) @@ -482,19 +482,19 @@ await devCtrl.WriteAttribute(1, [ (0, Clusters.AccessControl.Attributes.Acl( [ ``` await devCtrl.WriteAttribute(1, [ (0, Clusters.AccessControl.Attributes.Acl( [ - Clusters.AccessControl.Structs.AccessControlEntry( - privilege = Clusters.AccessControl.Enums.Privilege.kAdminister, - authMode = Clusters.AccessControl.Enums.AuthMode.kCase, + Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, + authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects = [ 1 ] ), - Clusters.AccessControl.Structs.AccessControlEntry( - privilege = Clusters.AccessControl.Enums.Privilege.kView, - authMode = Clusters.AccessControl.Enums.AuthMode.kCase, + Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, + authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects = [ 4444, 5555, 6666 ], ), - Clusters.AccessControl.Structs.AccessControlEntry( - privilege = Clusters.AccessControl.Enums.Privilege.kOperate, - authMode = Clusters.AccessControl.Enums.AuthMode.kGroup, + Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kOperate, + authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kGroup, subjects = [ 123, 456 ], targets = [ Clusters.AccessControl.Structs.Target( diff --git a/docs/guides/repl/.ipynb_checkpoints/Matter - Basic Interactions-checkpoint.ipynb b/docs/guides/repl/.ipynb_checkpoints/Matter - Basic Interactions-checkpoint.ipynb index cf2046aaebc0bd..48cac23fe3434b 100644 --- a/docs/guides/repl/.ipynb_checkpoints/Matter - Basic Interactions-checkpoint.ipynb +++ b/docs/guides/repl/.ipynb_checkpoints/Matter - Basic Interactions-checkpoint.ipynb @@ -1414,7 +1414,7 @@ "│ │ │ <class 'chip.clusters.Objects.Basic.Attributes.ClusterRevision'>: 1\n", "│ │ },\n", "│ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor'>: {\n", - "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOtaProviders'>: [],\n", + "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOTAProviders'>: [],\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdatePossible'>: True,\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'>: <OTAUpdateStateEnum.kUnknown: 0>,\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateStateProgress'>: 0,\n", @@ -2430,7 +2430,7 @@ "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.Basic.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n", "\u001b[2;32m│ │ \u001b[0m\u001b[1m}\u001b[0m,\n", "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOtaProviders'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", + "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOTAProviders'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdatePossible'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;92mTrue\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mOTAUpdateStateEnum.kUnknown:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1m>\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateStateProgress'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n", diff --git a/docs/guides/repl/Matter_Access_Control.ipynb b/docs/guides/repl/Matter_Access_Control.ipynb index 80dae46862b901..8bc0c44a72a5ac 100644 --- a/docs/guides/repl/Matter_Access_Control.ipynb +++ b/docs/guides/repl/Matter_Access_Control.ipynb @@ -500,10 +500,10 @@ } ], "source": [ - "acl = [ Clusters.AccessControl.Structs.AccessControlEntry(\n", + "acl = [ Clusters.AccessControl.Structs.AccessControlEntryStruct(\n", " fabricIndex = 1,\n", - " privilege = Clusters.AccessControl.Enums.Privilege.kAdminister,\n", - " authMode = Clusters.AccessControl.Enums.AuthMode.kCase,\n", + " privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister,\n", + " authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase,\n", " subjects = [ 1 ] ) \n", "]\n", "\n", @@ -729,10 +729,10 @@ } ], "source": [ - "acl.append(Clusters.AccessControl.Structs.AccessControlEntry(\n", + "acl.append(Clusters.AccessControl.Structs.AccessControlEntryStruct(\n", " fabricIndex = 1,\n", - " privilege = Clusters.AccessControl.Enums.Privilege.kOperate,\n", - " authMode = Clusters.AccessControl.Enums.AuthMode.kCase,\n", + " privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kOperate,\n", + " authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase,\n", " targets = [ Clusters.AccessControl.Structs.Target(\n", " endpoint = 1,\n", " ) ] ) )\n", diff --git a/docs/guides/repl/Matter_Basic_Interactions.ipynb b/docs/guides/repl/Matter_Basic_Interactions.ipynb index 0693f197cdc8b9..12d9224ef48613 100644 --- a/docs/guides/repl/Matter_Basic_Interactions.ipynb +++ b/docs/guides/repl/Matter_Basic_Interactions.ipynb @@ -1407,7 +1407,7 @@ "│ │ │ <class 'chip.clusters.Objects.Basic.Attributes.ClusterRevision'>: 1\n", "│ │ },\n", "│ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor'>: {\n", - "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOtaProviders'>: [],\n", + "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOTAProviders'>: [],\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdatePossible'>: True,\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'>: <OTAUpdateStateEnum.kUnknown: 0>,\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateStateProgress'>: 0,\n", @@ -2423,7 +2423,7 @@ "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.Basic.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n", "\u001b[2;32m│ │ \u001b[0m\u001b[1m}\u001b[0m,\n", "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOtaProviders'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", + "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOTAProviders'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdatePossible'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;92mTrue\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mOTAUpdateStateEnum.kUnknown:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1m>\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateStateProgress'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n", 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 e5781c207776a5..754985f37dd4f4 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 @@ -57,12 +57,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -70,22 +70,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -96,7 +96,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -258,7 +258,7 @@ server cluster OnOff = 6 { readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; + OnOffEffectIdentifier effectIdentifier = 0; OnOffDelayedAllOffEffectVariant effectVariant = 1; } @@ -396,7 +396,7 @@ server cluster BinaryInputBasic = 15 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -423,19 +423,13 @@ server cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -443,9 +437,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -457,7 +457,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -466,7 +466,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -474,12 +474,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -636,8 +636,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -718,22 +718,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -3947,7 +3947,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; 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 d0874dec15e8e4..550c16da95fef7 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 @@ -1663,7 +1663,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1699,7 +1699,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/all-clusters-app/ameba/main/include/OnOffCommands.h b/examples/all-clusters-app/ameba/main/include/OnOffCommands.h index 47dfe5698de4aa..02b77ed029284d 100644 --- a/examples/all-clusters-app/ameba/main/include/OnOffCommands.h +++ b/examples/all-clusters-app/ameba/main/include/OnOffCommands.h @@ -124,8 +124,8 @@ void ProcessOnOffUnicastBindingCommand(BindingCommandData * data, const EmberBin break; case Clusters::OnOff::Commands::OffWithEffect::Id: - offwitheffectCommand.effectId = static_cast(data->args[0]); - offwitheffectCommand.effectVariant = static_cast(data->args[1]); + offwitheffectCommand.effectIdentifier = static_cast(data->args[0]); + offwitheffectCommand.effectVariant = static_cast(data->args[1]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, offwitheffectCommand, onSuccess, onFailure); break; @@ -171,8 +171,8 @@ void ProcessOnOffGroupBindingCommand(BindingCommandData * data, const EmberBindi break; case Clusters::OnOff::Commands::OffWithEffect::Id: - offwitheffectCommand.effectId = static_cast(data->args[0]); - offwitheffectCommand.effectVariant = static_cast(data->args[1]); + offwitheffectCommand.effectIdentifier = static_cast(data->args[0]); + offwitheffectCommand.effectVariant = static_cast(data->args[1]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, offwitheffectCommand); break; diff --git a/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp b/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp index edaa86e44d5125..0ab2703cb268b2 100644 --- a/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp +++ b/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp @@ -26,7 +26,7 @@ using namespace ::chip; using namespace ::chip::app::Clusters; using namespace ::chip::app::Clusters::DoorLock; -LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); +LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); // Provided some empty callbacks and replaced feature map // to simulate DoorLock endpoint for All-Clusters-App example diff --git a/examples/all-clusters-app/nrfconnect/prj.conf b/examples/all-clusters-app/nrfconnect/prj.conf index ee2bee67b64ce4..51d5dd89c68a5f 100644 --- a/examples/all-clusters-app/nrfconnect/prj.conf +++ b/examples/all-clusters-app/nrfconnect/prj.conf @@ -36,6 +36,9 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n +# Reduce application size +CONFIG_USE_SEGGER_RTT=n + # Disable OTA requestor CONFIG_CHIP_OTA_REQUESTOR=n diff --git a/examples/all-clusters-app/nrfconnect/prj_dfu.conf b/examples/all-clusters-app/nrfconnect/prj_dfu.conf index b91bf3fa8298a6..c0d47e635ed406 100644 --- a/examples/all-clusters-app/nrfconnect/prj_dfu.conf +++ b/examples/all-clusters-app/nrfconnect/prj_dfu.conf @@ -35,7 +35,8 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n -# reduce application size by disabling including assertions in the output file. +# Reduce application size +CONFIG_USE_SEGGER_RTT=n CONFIG_ASSERT_VERBOSE=n CONFIG_ASSERT_NO_FILE_INFO=y CONFIG_ASSERT_NO_COND_INFO=y diff --git a/examples/all-clusters-app/nrfconnect/prj_release.conf b/examples/all-clusters-app/nrfconnect/prj_release.conf index 5816426f0fc09e..b229f68b308b9d 100644 --- a/examples/all-clusters-app/nrfconnect/prj_release.conf +++ b/examples/all-clusters-app/nrfconnect/prj_release.conf @@ -35,6 +35,7 @@ CONFIG_BT_DEVICE_NAME="AllClusters" CONFIG_RESET_ON_FATAL_ERROR=y # Disable all debug features +CONFIG_USE_SEGGER_RTT=n CONFIG_SHELL=n CONFIG_OPENTHREAD_SHELL=n CONFIG_CONSOLE=n 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 288a32def968f1..58e0c12b20d3e9 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 @@ -51,12 +51,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -64,22 +64,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -90,7 +90,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -346,7 +346,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -373,19 +373,13 @@ server cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -393,9 +387,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -411,7 +411,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -419,11 +419,11 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -571,8 +571,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -653,22 +653,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -3328,7 +3328,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; 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 a9d16f86c65d19..87189ce6654867 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 @@ -1663,7 +1663,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1699,7 +1699,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj.conf b/examples/all-clusters-minimal-app/nrfconnect/prj.conf index 2c2c8d2fc81c28..c33baaa8d79761 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj.conf @@ -36,6 +36,9 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n +# Reduce application size +CONFIG_USE_SEGGER_RTT=n + # Disable OTA requestor CONFIG_CHIP_OTA_REQUESTOR=n diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf b/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf index 292d7a086d4e89..6effabf6914a9b 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf @@ -36,7 +36,8 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n -# reduce application size by disabling including assertions in the output file. +# Reduce application size +CONFIG_USE_SEGGER_RTT=n CONFIG_ASSERT_VERBOSE=n CONFIG_ASSERT_NO_FILE_INFO=y CONFIG_ASSERT_NO_COND_INFO=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf b/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf index 33cd3f38589653..8029f55a1e31f4 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf @@ -35,6 +35,7 @@ CONFIG_BT_DEVICE_NAME="AllClusters" CONFIG_RESET_ON_FATAL_ERROR=y # Disable all debug features +CONFIG_USE_SEGGER_RTT=n CONFIG_SHELL=n CONFIG_OPENTHREAD_SHELL=n CONFIG_CONSOLE=n diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 7a6bea24441155..bc512081ede0c3 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -193,7 +193,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -226,19 +226,13 @@ client cluster Binding = 30 { } client cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -246,9 +240,15 @@ client cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -260,7 +260,7 @@ client cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -269,7 +269,7 @@ client cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -277,12 +277,12 @@ client cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -294,19 +294,13 @@ client cluster AccessControl = 31 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -314,9 +308,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -328,7 +328,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -337,7 +337,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -345,12 +345,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 4dd2570986fd4f..20770992d3c6de 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -52,12 +52,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -65,22 +65,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -91,7 +91,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -253,7 +253,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -285,19 +285,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -305,9 +299,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -319,7 +319,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -328,7 +328,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -336,12 +336,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -410,8 +410,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -503,22 +503,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1349,7 +1349,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index ab66735db5b2df..d08112b8a74d62 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 8ea622527a82d2..b581d736f30482 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -58,12 +58,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -71,22 +71,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -97,7 +97,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -154,7 +154,7 @@ server cluster OnOff = 6 { readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; + OnOffEffectIdentifier effectIdentifier = 0; OnOffDelayedAllOffEffectVariant effectVariant = 1; } @@ -271,7 +271,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -287,19 +287,13 @@ server cluster Descriptor = 29 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -307,9 +301,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -321,7 +321,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -330,7 +330,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -338,12 +338,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -421,8 +421,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -514,22 +514,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster GeneralCommissioning = 48 { @@ -1426,7 +1426,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 8634ffb89470c2..b8f4d837892f1a 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -1657,7 +1657,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1693,7 +1693,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 7515f9055d5ed5..cfaef808114702 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -52,12 +52,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -65,22 +65,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -91,7 +91,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -104,7 +104,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -136,19 +136,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -156,9 +150,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -170,7 +170,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -179,7 +179,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -187,12 +187,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -261,8 +261,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -354,22 +354,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1087,7 +1087,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index c0b3b624458b12..8e49bac0c5fbb9 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 220c3493ca6bd5..7c314a9211d015 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -52,12 +52,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -65,22 +65,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -91,7 +91,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -253,7 +253,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -285,19 +285,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -305,9 +299,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -319,7 +319,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -328,7 +328,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -336,12 +336,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -410,8 +410,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -503,22 +503,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1233,7 +1233,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index dfedd4ba175e21..622d97c5033235 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index fc1f5da4f75fe0..472e9477262e0a 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -52,12 +52,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -65,22 +65,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -91,7 +91,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -104,7 +104,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -136,19 +136,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -156,9 +150,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -170,7 +170,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -179,7 +179,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -187,12 +187,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -261,8 +261,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -354,22 +354,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1472,7 +1472,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 0e56a1a59a4289..cfcba042044c38 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 774e7065d99d33..dff1a98eed5aa3 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -52,12 +52,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -65,22 +65,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -91,7 +91,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -253,7 +253,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -285,19 +285,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -305,9 +299,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -319,7 +319,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -328,7 +328,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -336,12 +336,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -410,8 +410,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -503,22 +503,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1488,7 +1488,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index dba651796102e3..4a6c20dc3678d3 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 59b42def6f6ea7..15e0a1034d897c 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -58,12 +58,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -71,22 +71,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -97,7 +97,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -110,7 +110,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -126,19 +126,13 @@ server cluster Descriptor = 29 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -146,9 +140,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -160,7 +160,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -169,7 +169,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -177,12 +177,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -260,8 +260,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -353,22 +353,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1143,7 +1143,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 1b917cc96427bc..15bea4e9f4e799 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -1657,7 +1657,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1693,7 +1693,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 665d0720ff4250..7c6446e1e8cc9b 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -65,12 +65,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -78,22 +78,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -104,7 +104,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -117,7 +117,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -149,19 +149,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -169,9 +163,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -183,7 +183,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -192,7 +192,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -200,12 +200,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -274,8 +274,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -367,22 +367,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1099,7 +1099,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index c04b23579cd78f..05284278d50fde 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index eee4e4754bfcb1..3b36f2ae987519 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -52,12 +52,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -65,22 +65,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -91,7 +91,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -246,7 +246,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -278,19 +278,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -298,9 +292,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -312,7 +312,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -321,7 +321,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -329,12 +329,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -403,8 +403,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -496,22 +496,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1341,7 +1341,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 7d2c77f7a7261e..44ce0f1b32df80 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 4f0c7c0f14b129..39ad6dd5f3013c 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -65,12 +65,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -78,22 +78,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -104,7 +104,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -117,7 +117,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -149,19 +149,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -169,9 +163,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -183,7 +183,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -192,7 +192,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -200,12 +200,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -274,8 +274,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -367,22 +367,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1099,7 +1099,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index a9a852b9e2cf6c..5114019f8d73f5 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 993e09d3cb3491..a0a6b310a10319 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -65,12 +65,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -78,22 +78,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -104,7 +104,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -117,7 +117,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -149,19 +149,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -169,9 +163,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -183,7 +183,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -192,7 +192,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -200,12 +200,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -274,8 +274,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -367,22 +367,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1103,7 +1103,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index 2424113df9d07e..223b4e055cda69 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index aecd711bca2c46..770f2495594654 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -65,12 +65,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -78,22 +78,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -104,7 +104,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -117,7 +117,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -149,19 +149,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -169,9 +163,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -183,7 +183,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -192,7 +192,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -200,12 +200,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -274,8 +274,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -367,22 +367,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1098,7 +1098,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 60d6a2983d9782..36b8f09ea009af 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 45a58c4b1657df..f3f026c679f961 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -52,12 +52,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -65,22 +65,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -91,7 +91,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -253,7 +253,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -285,19 +285,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -305,9 +299,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -319,7 +319,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -328,7 +328,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -336,12 +336,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -410,8 +410,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -503,22 +503,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1223,7 +1223,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index c0e106f8eb8281..f366046581c6ea 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index d6420b00798d7e..647f5be459e9da 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -52,12 +52,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -65,22 +65,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -91,7 +91,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -196,7 +196,7 @@ server cluster OnOff = 6 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -228,19 +228,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -248,9 +242,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -262,7 +262,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -271,7 +271,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -279,12 +279,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -353,8 +353,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -446,22 +446,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1166,7 +1166,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index e1db44e7efa78e..9a251571ccd7e0 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 5558267d95063b..e5a1c171203196 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -52,12 +52,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -65,22 +65,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -91,7 +91,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -154,7 +154,7 @@ server cluster OnOff = 6 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -186,19 +186,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -206,9 +200,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -220,7 +220,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -229,7 +229,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -237,12 +237,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -311,8 +311,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -404,22 +404,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1124,7 +1124,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index 88077564992f0a..905f811e581e9d 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index c6ebe078910881..efb2f5ebbb9e58 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -70,12 +70,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -83,22 +83,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -109,7 +109,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -122,7 +122,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -154,19 +154,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -174,9 +168,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -188,7 +188,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -197,7 +197,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -205,12 +205,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -279,8 +279,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -372,22 +372,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1108,7 +1108,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 8cdcfd01a4b75e..87acceec68559e 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 218f76f0dca83f..0a3f54e975dfb5 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -49,12 +49,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -62,22 +62,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -88,7 +88,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -244,7 +244,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -276,19 +276,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -296,9 +290,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -310,7 +310,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -319,7 +319,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -327,12 +327,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -401,8 +401,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -494,22 +494,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1214,7 +1214,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 0d001f8f524993..ee674ca36239af 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 614cce0bbda109..4ca3f3231e275f 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -65,12 +65,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -78,22 +78,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -104,7 +104,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -117,7 +117,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -149,19 +149,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -169,9 +163,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -183,7 +183,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -192,7 +192,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -200,12 +200,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -274,8 +274,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -367,22 +367,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1098,7 +1098,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index 3c52979b32b5b2..deb4316ea5b8da 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 99cef508b903ef..35202e6eb9c2e6 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -52,12 +52,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -65,22 +65,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -91,7 +91,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -104,7 +104,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -136,19 +136,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -156,9 +150,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -170,7 +170,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -179,7 +179,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -187,12 +187,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -261,8 +261,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -354,22 +354,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1236,7 +1236,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index 99ebe10bf6fad3..a275cc7a7c50d4 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 637104a944361a..455c6dc74ddb73 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -52,12 +52,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -65,22 +65,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -91,7 +91,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -104,7 +104,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -136,19 +136,13 @@ client cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -156,9 +150,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -170,7 +170,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -179,7 +179,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -187,12 +187,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -261,8 +261,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -354,22 +354,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1216,7 +1216,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index 9c2c66761f534e..613186058c068a 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -1593,7 +1593,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1629,7 +1629,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/chef/nrfconnect/main.cpp b/examples/chef/nrfconnect/main.cpp index 8c3061945838d7..17e207ead026cc 100644 --- a/examples/chef/nrfconnect/main.cpp +++ b/examples/chef/nrfconnect/main.cpp @@ -43,7 +43,7 @@ #include "Rpc.h" #endif -LOG_MODULE_REGISTER(app, CONFIG_MATTER_LOG_LEVEL); +LOG_MODULE_REGISTER(app, CONFIG_CHIP_APP_LOG_LEVEL); using namespace chip; using namespace chip::Shell; 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 4ae4707493e858..983188af02fd42 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 @@ -79,7 +79,6 @@ "define": "IDENTIFY_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "identify time", @@ -582,7 +581,6 @@ "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "OnOff", @@ -625,7 +623,6 @@ "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -652,7 +649,6 @@ "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "switch type", @@ -803,10 +799,9 @@ "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { - "name": "current level", + "name": "CurrentLevel", "code": 0, "mfgCode": null, "side": "server", @@ -846,7 +841,6 @@ "define": "DESCRIPTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -873,10 +867,9 @@ "define": "DESCRIPTOR_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { - "name": "device list", + "name": "DeviceTypeList", "code": 0, "mfgCode": null, "side": "server", @@ -892,7 +885,7 @@ "reportableChange": 0 }, { - "name": "server list", + "name": "ServerList", "code": 1, "mfgCode": null, "side": "server", @@ -908,7 +901,7 @@ "reportableChange": 0 }, { - "name": "client list", + "name": "ClientList", "code": 2, "mfgCode": null, "side": "server", @@ -924,7 +917,7 @@ "reportableChange": 0 }, { - "name": "parts list", + "name": "PartsList", "code": 3, "mfgCode": null, "side": "server", @@ -980,7 +973,6 @@ "define": "ACCESS_CONTROL_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -1007,7 +999,6 @@ "define": "ACCESS_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ACL", @@ -1143,10 +1134,9 @@ "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -1170,10 +1160,9 @@ "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "DataModelRevision", @@ -1666,7 +1655,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1700,10 +1689,9 @@ "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", @@ -1822,9 +1810,7 @@ "mfgCode": null, "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Localization Configuration", @@ -1833,7 +1819,6 @@ "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ActiveLocale", @@ -1907,9 +1892,7 @@ "mfgCode": null, "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Time Format Localization", @@ -1918,7 +1901,6 @@ "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "HourFormat", @@ -2008,9 +1990,7 @@ "mfgCode": null, "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Unit Localization", @@ -2019,7 +1999,6 @@ "define": "UNIT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "TemperatureUnit", @@ -2586,7 +2565,6 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -2613,7 +2591,6 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "NetworkInterfaces", @@ -2820,7 +2797,6 @@ "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ThreadMetrics", @@ -2963,7 +2939,6 @@ "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "channel", @@ -2972,7 +2947,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2986,9 +2961,9 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "RoutingRole", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3004,7 +2979,7 @@ "side": "server", "type": "char_string", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3020,7 +2995,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3036,7 +3011,7 @@ "side": "server", "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000000000000000", @@ -3052,7 +3027,7 @@ "side": "server", "type": "octet_string", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3068,7 +3043,7 @@ "side": "server", "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000000000000000", @@ -3116,7 +3091,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3132,7 +3107,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3148,7 +3123,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3164,7 +3139,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3180,7 +3155,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3196,7 +3171,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3212,7 +3187,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3228,7 +3203,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3244,7 +3219,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3260,7 +3235,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3276,7 +3251,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3292,7 +3267,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3308,7 +3283,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3324,7 +3299,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3340,7 +3315,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3356,7 +3331,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3372,7 +3347,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3388,7 +3363,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3404,7 +3379,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3420,7 +3395,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3436,7 +3411,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3452,7 +3427,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3468,7 +3443,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3484,7 +3459,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3500,7 +3475,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3516,7 +3491,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3532,7 +3507,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3548,7 +3523,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3564,7 +3539,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3580,7 +3555,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3596,7 +3571,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3612,7 +3587,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3628,7 +3603,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3644,7 +3619,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3660,7 +3635,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3676,7 +3651,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3692,7 +3667,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3708,7 +3683,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3724,7 +3699,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3740,7 +3715,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3756,7 +3731,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3772,7 +3747,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3788,7 +3763,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3804,7 +3779,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3820,7 +3795,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3836,7 +3811,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3852,7 +3827,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3868,7 +3843,7 @@ "side": "server", "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000000000000000", @@ -3884,7 +3859,7 @@ "side": "server", "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000000000000000", @@ -3894,13 +3869,13 @@ "reportableChange": 0 }, { - "name": "delay", + "name": "Delay", "code": 58, "mfgCode": null, "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3914,7 +3889,7 @@ "code": 59, "mfgCode": null, "side": "server", - "type": "array", + "type": "SecurityPolicy", "included": 1, "storageOption": "External", "singleton": 0, @@ -3926,13 +3901,13 @@ "reportableChange": 0 }, { - "name": "ChannelMask", + "name": "ChannelPage0Mask", "code": 60, "mfgCode": null, "side": "server", "type": "octet_string", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3946,7 +3921,7 @@ "code": 61, "mfgCode": null, "side": "server", - "type": "array", + "type": "OperationalDatasetComponents", "included": 1, "storageOption": "External", "singleton": 0, @@ -4050,7 +4025,6 @@ "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "bssid", @@ -4337,7 +4311,6 @@ "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "PHYRate", @@ -4523,9 +4496,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Switch", @@ -4534,7 +4505,6 @@ "define": "SWITCH_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "FeatureMap", @@ -4629,14 +4599,13 @@ "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "WindowStatus", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "CommissioningWindowStatus", "included": 1, "storageOption": "External", "singleton": 0, @@ -4784,14 +4753,6 @@ "source": "client", "incoming": 1, "outgoing": 1 - }, - { - "name": "RemoveTrustedRootCertificate", - "code": 12, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 } ], "attributes": [ @@ -4940,7 +4901,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "fabric_idx", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, @@ -5025,8 +4986,7 @@ "incoming": 1, "outgoing": 0 } - ], - "attributes": [] + ] }, { "name": "Group Key Management", @@ -5158,9 +5118,7 @@ "mfgCode": null, "define": "FIXED_LABEL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Fixed Label", @@ -5169,7 +5127,6 @@ "define": "FIXED_LABEL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "label list", @@ -5227,9 +5184,7 @@ "mfgCode": null, "define": "USER_LABEL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "User Label", @@ -5238,7 +5193,6 @@ "define": "USER_LABEL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "label list", @@ -5349,7 +5303,6 @@ "define": "IDENTIFY_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "identify time", @@ -5932,7 +5885,6 @@ "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "OnOff", @@ -6147,10 +6099,9 @@ "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { - "name": "current level", + "name": "CurrentLevel", "code": 0, "mfgCode": null, "side": "server", @@ -6166,7 +6117,7 @@ "reportableChange": 0 }, { - "name": "remaining time", + "name": "RemainingTime", "code": 1, "mfgCode": null, "side": "server", @@ -6182,7 +6133,7 @@ "reportableChange": 0 }, { - "name": "min level", + "name": "MinLevel", "code": 2, "mfgCode": null, "side": "server", @@ -6198,7 +6149,7 @@ "reportableChange": 0 }, { - "name": "max level", + "name": "MaxLevel", "code": 3, "mfgCode": null, "side": "server", @@ -6214,7 +6165,7 @@ "reportableChange": 0 }, { - "name": "current frequency", + "name": "CurrentFrequency", "code": 4, "mfgCode": null, "side": "server", @@ -6230,7 +6181,7 @@ "reportableChange": 0 }, { - "name": "min frequency", + "name": "MinFrequency", "code": 5, "mfgCode": null, "side": "server", @@ -6246,7 +6197,7 @@ "reportableChange": 0 }, { - "name": "max frequency", + "name": "MaxFrequency", "code": 6, "mfgCode": null, "side": "server", @@ -6262,11 +6213,11 @@ "reportableChange": 0 }, { - "name": "options", + "name": "Options", "code": 15, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "LevelControlOptions", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6278,7 +6229,7 @@ "reportableChange": 0 }, { - "name": "on off transition time", + "name": "OnOffTransitionTime", "code": 16, "mfgCode": null, "side": "server", @@ -6294,7 +6245,7 @@ "reportableChange": 0 }, { - "name": "on level", + "name": "OnLevel", "code": 17, "mfgCode": null, "side": "server", @@ -6310,7 +6261,7 @@ "reportableChange": 0 }, { - "name": "on transition time", + "name": "OnTransitionTime", "code": 18, "mfgCode": null, "side": "server", @@ -6326,7 +6277,7 @@ "reportableChange": 0 }, { - "name": "off transition time", + "name": "OffTransitionTime", "code": 19, "mfgCode": null, "side": "server", @@ -6342,7 +6293,7 @@ "reportableChange": 0 }, { - "name": "default move rate", + "name": "DefaultMoveRate", "code": 20, "mfgCode": null, "side": "server", @@ -6358,7 +6309,7 @@ "reportableChange": 0 }, { - "name": "start up current level", + "name": "StartUpCurrentLevel", "code": 16384, "mfgCode": null, "side": "server", @@ -6462,7 +6413,6 @@ "define": "DESCRIPTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -6489,10 +6439,9 @@ "define": "DESCRIPTOR_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { - "name": "device list", + "name": "DeviceTypeList", "code": 0, "mfgCode": null, "side": "server", @@ -6508,7 +6457,7 @@ "reportableChange": 0 }, { - "name": "server list", + "name": "ServerList", "code": 1, "mfgCode": null, "side": "server", @@ -6524,7 +6473,7 @@ "reportableChange": 0 }, { - "name": "client list", + "name": "ClientList", "code": 2, "mfgCode": null, "side": "server", @@ -6540,7 +6489,7 @@ "reportableChange": 0 }, { - "name": "parts list", + "name": "PartsList", "code": 3, "mfgCode": null, "side": "server", @@ -6593,10 +6542,9 @@ "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -6620,10 +6568,9 @@ "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "DataModelRevision", @@ -7150,7 +7097,6 @@ "define": "COLOR_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "CurrentHue", @@ -7265,7 +7211,7 @@ "reportableChange": 0 }, { - "name": "ColorTemperature", + "name": "ColorTemperatureMireds", "code": 7, "mfgCode": null, "side": "server", @@ -7561,7 +7507,6 @@ "define": "OCCUPANCY_SENSING_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -7588,7 +7533,6 @@ "define": "OCCUPANCY_SENSING_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "occupancy", diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index d870c1d5cf92f2..86e003a69201c4 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -58,6 +58,7 @@ static_library("chip-tool-utils") { "commands/common/Commands.cpp", "commands/common/Commands.h", "commands/common/CredentialIssuerCommands.h", + "commands/common/HexConversion.h", "commands/discover/DiscoverCommand.cpp", "commands/discover/DiscoverCommissionablesCommand.cpp", "commands/discover/DiscoverCommissionersCommand.cpp", diff --git a/examples/chip-tool/commands/clusters/ClusterCommand.h b/examples/chip-tool/commands/clusters/ClusterCommand.h index 33320760dd9d9a..f6cb307021ac5d 100644 --- a/examples/chip-tool/commands/clusters/ClusterCommand.h +++ b/examples/chip-tool/commands/clusters/ClusterCommand.h @@ -45,16 +45,14 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return InteractionModelCommands::SendCommand(device, endpointIds.at(0), mClusterId, mCommandId, mPayload, - mTimedInteractionTimeoutMs, mSuppressResponse, mRepeatCount, mRepeatDelayInMs); + return InteractionModelCommands::SendCommand(device, endpointIds.at(0), mClusterId, mCommandId, mPayload); } template CHIP_ERROR SendCommand(chip::DeviceProxy * device, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::CommandId commandId, const T & value) { - return InteractionModelCommands::SendCommand(device, endpointId, clusterId, commandId, value, mTimedInteractionTimeoutMs, - mSuppressResponse, mRepeatCount, mRepeatDelayInMs); + return InteractionModelCommands::SendCommand(device, endpointId, clusterId, commandId, value); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override @@ -184,10 +182,6 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub private: chip::ClusterId mClusterId; chip::CommandId mCommandId; - chip::Optional mTimedInteractionTimeoutMs; - chip::Optional mSuppressResponse; - chip::Optional mRepeatCount; - chip::Optional mRepeatDelayInMs; CHIP_ERROR mError = CHIP_NO_ERROR; CustomArgument mPayload; diff --git a/examples/chip-tool/commands/clusters/ComplexArgument.h b/examples/chip-tool/commands/clusters/ComplexArgument.h index 2af80e5b3eef3e..e624aeb2cf583c 100644 --- a/examples/chip-tool/commands/clusters/ComplexArgument.h +++ b/examples/chip-tool/commands/clusters/ComplexArgument.h @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -210,18 +211,22 @@ class ComplexArgumentParser size = str.size(); } - if (size % 2 != 0) - { - ChipLogError(chipTool, "Error while encoding %s as a hex string: Odd number of characters.", label); - return CHIP_ERROR_INVALID_STRING_LENGTH; - } + CHIP_ERROR err = HexToBytes( + chip::CharSpan(str.c_str(), size), + [&buffer](size_t allocSize) { + buffer = static_cast(chip::Platform::MemoryCalloc(allocSize, sizeof(uint8_t))); + return buffer; + }, + &size); - buffer = static_cast(chip::Platform::MemoryCalloc(size / 2, sizeof(uint8_t))); - size = chip::Encoding::HexToBytes(str.c_str(), size, buffer, size / 2); - if (size == 0) + if (err != CHIP_NO_ERROR) { - ChipLogError(chipTool, "Error while encoding %s as a hex string.", label); - return CHIP_ERROR_INTERNAL; + if (buffer != nullptr) + { + chip::Platform::MemoryFree(buffer); + } + + return err; } } diff --git a/examples/chip-tool/commands/clusters/CustomArgument.h b/examples/chip-tool/commands/clusters/CustomArgument.h index 63fe7d7ade387e..ab6ce40752ae76 100644 --- a/examples/chip-tool/commands/clusters/CustomArgument.h +++ b/examples/chip-tool/commands/clusters/CustomArgument.h @@ -19,6 +19,7 @@ #pragma once #include +#include #include #include #include @@ -140,14 +141,18 @@ class CustomArgumentParser static CHIP_ERROR PutOctetString(chip::TLV::TLVWriter * writer, chip::TLV::Tag tag, Json::Value & value) { - size_t size = strlen(value.asCString()); - VerifyOrReturnError(size % 2 == 0, CHIP_ERROR_INVALID_STRING_LENGTH); - + const char * hexData = value.asCString() + kPayloadHexPrefixLen; + size_t hexDataLen = strlen(hexData); chip::Platform::ScopedMemoryBuffer buffer; - VerifyOrReturnError(buffer.Calloc(size / 2), CHIP_ERROR_NO_MEMORY); - size_t octetCount = chip::Encoding::HexToBytes(value.asCString() + kPayloadHexPrefixLen, size - kPayloadHexPrefixLen, - buffer.Get(), (size - kPayloadHexPrefixLen) / 2); - VerifyOrReturnError(octetCount != 0, CHIP_ERROR_NO_MEMORY); + + size_t octetCount; + ReturnErrorOnFailure(HexToBytes( + chip::CharSpan(hexData, hexDataLen), + [&buffer](size_t allocSize) { + buffer.Calloc(allocSize); + return buffer.Get(); + }, + &octetCount)); return chip::app::DataModel::Encode(*writer, tag, chip::ByteSpan(buffer.Get(), octetCount)); } diff --git a/examples/chip-tool/commands/clusters/ReportCommand.h b/examples/chip-tool/commands/clusters/ReportCommand.h index b79ec5eb28ec19..eae5fa8ee51054 100644 --- a/examples/chip-tool/commands/clusters/ReportCommand.h +++ b/examples/chip-tool/commands/clusters/ReportCommand.h @@ -209,7 +209,7 @@ class ReadAttribute : public ReadCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return ReadCommand::ReadAttribute(device, endpointIds, mClusterIds, mAttributeIds, mFabricFiltered, mDataVersion); + return ReadCommand::ReadAttribute(device, endpointIds, mClusterIds, mAttributeIds); } private: @@ -224,14 +224,12 @@ class ReadAttribute : public ReadCommand { AddArgument("fabric-filtered", 0, 1, &mFabricFiltered, "Boolean indicating whether to do a fabric-filtered read. Defaults to true."); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion, + AddArgument("data-version", 0, UINT32_MAX, &mDataVersions, "Comma-separated list of data versions for the clusters being read."); } std::vector mClusterIds; std::vector mAttributeIds; - chip::Optional mFabricFiltered; - chip::Optional> mDataVersion; }; class SubscribeAttribute : public SubscribeCommand @@ -269,8 +267,7 @@ class SubscribeAttribute : public SubscribeCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return SubscribeCommand::SubscribeAttribute(device, endpointIds, mClusterIds, mAttributeIds, mMinInterval, mMaxInterval, - mFabricFiltered, mDataVersion, mKeepSubscriptions, mAutoResubscribe); + return SubscribeCommand::SubscribeAttribute(device, endpointIds, mClusterIds, mAttributeIds); } private: @@ -289,7 +286,7 @@ class SubscribeAttribute : public SubscribeCommand "Server must send a report if this number of seconds has elapsed since the last report."); AddArgument("fabric-filtered", 0, 1, &mFabricFiltered, "Boolean indicating whether to do a fabric-filtered subscription. Defaults to true."); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion, + AddArgument("data-version", 0, UINT32_MAX, &mDataVersions, "Comma-separated list of data versions for the clusters being subscribed to."); AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions, "Boolean indicating whether to keep existing subscriptions when creating the new one. Defaults to false."); @@ -299,13 +296,6 @@ class SubscribeAttribute : public SubscribeCommand std::vector mClusterIds; std::vector mAttributeIds; - - uint16_t mMinInterval; - uint16_t mMaxInterval; - chip::Optional mFabricFiltered; - chip::Optional> mDataVersion; - chip::Optional mKeepSubscriptions; - chip::Optional mAutoResubscribe; }; class ReadEvent : public ReadCommand @@ -344,14 +334,12 @@ class ReadEvent : public ReadCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return ReadCommand::ReadEvent(device, endpointIds, mClusterIds, mEventIds, mFabricFiltered, mEventNumber); + return ReadCommand::ReadEvent(device, endpointIds, mClusterIds, mEventIds); } private: std::vector mClusterIds; std::vector mEventIds; - chip::Optional mFabricFiltered; - chip::Optional mEventNumber; }; class SubscribeEvent : public SubscribeCommand @@ -409,21 +397,12 @@ class SubscribeEvent : public SubscribeCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return SubscribeCommand::SubscribeEvent(device, endpointIds, mClusterIds, mEventIds, mMinInterval, mMaxInterval, - mFabricFiltered, mEventNumber, mKeepSubscriptions, mIsUrgents, mAutoResubscribe); + return SubscribeCommand::SubscribeEvent(device, endpointIds, mClusterIds, mEventIds); } private: std::vector mClusterIds; std::vector mEventIds; - - uint16_t mMinInterval; - uint16_t mMaxInterval; - chip::Optional mFabricFiltered; - chip::Optional mEventNumber; - chip::Optional mKeepSubscriptions; - chip::Optional> mIsUrgents; - chip::Optional mAutoResubscribe; }; class ReadAll : public ReadCommand @@ -458,18 +437,13 @@ class ReadAll : public ReadCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return ReadCommand::ReadAll(device, endpointIds, mClusterIds, mAttributeIds, mEventIds, mFabricFiltered, mDataVersions, - mEventNumber); + return ReadCommand::ReadAll(device, endpointIds, mClusterIds, mAttributeIds, mEventIds); } private: std::vector mClusterIds; std::vector mAttributeIds; std::vector mEventIds; - - chip::Optional mFabricFiltered; - chip::Optional> mDataVersions; - chip::Optional mEventNumber; }; class SubscribeAll : public SubscribeCommand @@ -502,18 +476,11 @@ class SubscribeAll : public SubscribeCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return SubscribeCommand::SubscribeAll(device, endpointIds, mClusterIds, mAttributeIds, mEventIds, mMinInterval, - mMaxInterval, mFabricFiltered, mEventNumber, mKeepSubscriptions); + return SubscribeCommand::SubscribeAll(device, endpointIds, mClusterIds, mAttributeIds, mEventIds); } private: std::vector mClusterIds; std::vector mAttributeIds; std::vector mEventIds; - - uint16_t mMinInterval; - uint16_t mMaxInterval; - chip::Optional mFabricFiltered; - chip::Optional mEventNumber; - chip::Optional mKeepSubscriptions; }; diff --git a/examples/chip-tool/commands/clusters/WriteAttributeCommand.h b/examples/chip-tool/commands/clusters/WriteAttributeCommand.h index d220468d622260..56363cb481721d 100644 --- a/examples/chip-tool/commands/clusters/WriteAttributeCommand.h +++ b/examples/chip-tool/commands/clusters/WriteAttributeCommand.h @@ -129,9 +129,7 @@ class WriteAttribute : public InteractionModelWriter, public ModelCommand, publi CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, const T & values) { - return InteractionModelWriter::WriteAttribute(device, endpointIds, clusterIds, attributeIds, values, - mTimedInteractionTimeoutMs, mSuppressResponse, mDataVersions, mRepeatCount, - mRepeatDelayInMs); + return InteractionModelWriter::WriteAttribute(device, endpointIds, clusterIds, attributeIds, values); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex, std::vector clusterIds, @@ -249,12 +247,6 @@ class WriteAttribute : public InteractionModelWriter, public ModelCommand, publi std::vector mAttributeIds; CHIP_ERROR mError = CHIP_NO_ERROR; - chip::Optional mTimedInteractionTimeoutMs; - chip::Optional> mDataVersions; - chip::Optional mSuppressResponse; - chip::Optional mRepeatCount; - chip::Optional mRepeatDelayInMs; - T mAttributeValues; }; diff --git a/examples/chip-tool/commands/common/Command.cpp b/examples/chip-tool/commands/common/Command.cpp index c4161b6ac59908..cd39293954e4f5 100644 --- a/examples/chip-tool/commands/common/Command.cpp +++ b/examples/chip-tool/commands/common/Command.cpp @@ -18,6 +18,7 @@ #include "Command.h" #include "CustomStringPrefix.h" +#include "HexConversion.h" #include "platform/PlatformManager.h" #include @@ -377,14 +378,16 @@ bool Command::InitArgument(size_t argIndex, char * argValue) // representation is always longer than the octet string it encodes, // so we have enough space in argValue for the decoded version. chip::Platform::ScopedMemoryBuffer buffer; - if (!buffer.Calloc(argLen)) // Bigger than needed, but it's fine. - { - return false; - } - size_t octetCount = - chip::Encoding::HexToBytes(argValue + kHexStringPrefixLen, argLen - kHexStringPrefixLen, buffer.Get(), argLen); - if (octetCount == 0) + size_t octetCount; + CHIP_ERROR err = HexToBytes( + chip::CharSpan(argValue + kHexStringPrefixLen, argLen - kHexStringPrefixLen), + [&buffer](size_t allocSize) { + buffer.Calloc(allocSize); + return buffer.Get(); + }, + &octetCount); + if (err != CHIP_NO_ERROR) { return false; } diff --git a/examples/chip-tool/commands/common/HexConversion.h b/examples/chip-tool/commands/common/HexConversion.h new file mode 100644 index 00000000000000..b31568101f2a2d --- /dev/null +++ b/examples/chip-tool/commands/common/HexConversion.h @@ -0,0 +1,65 @@ +/* + * 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 + +/** + * Utility for converting a hex string to bytes, with the right error checking + * and allocation size computation. + * + * Takes a functor to allocate the buffer to use for the hex bytes. The functor + * is expected to return uint8_t *. The caller is responsible for cleaning up + * this buffer as needed. + * + * On success, *octetCount is filled with the number of octets placed in the + * buffer. On failure, the value of *octetCount is undefined. + */ +template +CHIP_ERROR HexToBytes(chip::CharSpan hex, F bufferAllocator, size_t * octetCount) +{ + *octetCount = 0; + + if (hex.size() % 2 != 0) + { + ChipLogError(chipTool, "Error while encoding '%.*s' as an octet string: Odd number of characters.", + static_cast(hex.size()), hex.data()); + return CHIP_ERROR_INVALID_STRING_LENGTH; + } + + const size_t bufferSize = hex.size() / 2; + uint8_t * buffer = bufferAllocator(bufferSize); + if (buffer == nullptr && bufferSize != 0) + { + ChipLogError(chipTool, "Failed to allocate buffer of size: %llu", static_cast(bufferSize)); + return CHIP_ERROR_NO_MEMORY; + } + + size_t byteCount = chip::Encoding::HexToBytes(hex.data(), hex.size(), buffer, bufferSize); + if (byteCount == 0 && hex.size() != 0) + { + ChipLogError(chipTool, "Error while encoding '%.*s' as an octet string.", static_cast(hex.size()), hex.data()); + return CHIP_ERROR_INTERNAL; + } + + *octetCount = byteCount; + return CHIP_NO_ERROR; +} 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 07f78d80522646..108218687f5598 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 @@ -60,12 +60,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -73,22 +73,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -99,7 +99,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -112,7 +112,7 @@ server cluster Groups = 4 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -128,19 +128,13 @@ server cluster Descriptor = 29 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -148,9 +142,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -162,7 +162,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -171,7 +171,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -179,12 +179,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -262,8 +262,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -355,22 +355,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1310,7 +1310,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; 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 6dd09d9367ba83..2004ac1190ae6b 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 @@ -1657,7 +1657,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1693,7 +1693,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/darwin-framework-tool/BUILD.gn b/examples/darwin-framework-tool/BUILD.gn index 76bfeead5a6e2b..3e59a3c9264342 100644 --- a/examples/darwin-framework-tool/BUILD.gn +++ b/examples/darwin-framework-tool/BUILD.gn @@ -124,6 +124,7 @@ executable("darwin-framework-tool") { "${chip_root}/examples/chip-tool/commands/common/Command.h", "${chip_root}/examples/chip-tool/commands/common/Commands.cpp", "${chip_root}/examples/chip-tool/commands/common/Commands.h", + "${chip_root}/examples/chip-tool/commands/common/HexConversion.h", "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp", "commands/clusters/ClusterCommandBridge.h", "commands/clusters/ModelCommandBridge.mm", @@ -246,3 +247,9 @@ if (chip_codesign) { outputs = [ "${root_build_dir}/${output_name}" ] } } + +# Make sure we only build darwin-framework-tool, and not extraneous +# things like address-resolve, by default. +group("default") { + deps = [ ":darwin-framework-tool" ] +} diff --git a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm index 68eef16bfc31fe..f77b8d668656ae 100644 --- a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm +++ b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm @@ -59,7 +59,7 @@ - (void)handleQueryImageForNodeID:(NSNumber * _Nonnull)nodeID return; } - auto hasCandidate = [self SelectOTACandidate:params.vendorId rPID:params.productId rSV:params.softwareVersion]; + auto hasCandidate = [self SelectOTACandidate:params.vendorID rPID:params.productID rSV:params.softwareVersion]; if (!hasCandidate) { NSLog(@"Unable to select OTA Image."); _selectedCandidate.status = @(MTROTASoftwareUpdateProviderOTAQueryStatusNotAvailable); @@ -222,8 +222,8 @@ - (bool)SelectOTACandidate:(NSNumber *)requestorVendorID auto candidateSoftwareVersion = [candidate.softwareVersion unsignedLongValue]; auto candidateMinApplicableSoftwareVersion = [candidate.deviceModelData.minApplicableSoftwareVersion unsignedLongValue]; auto candidateMaxApplicableSoftwareVersion = [candidate.deviceModelData.maxApplicableSoftwareVersion unsignedLongValue]; - auto candidateVendorId = [candidate.deviceModelData.vendorId unsignedIntValue]; - auto candidateProductId = [candidate.deviceModelData.productId unsignedIntValue]; + auto candidateVendorId = [candidate.deviceModelData.vendorID unsignedIntValue]; + auto candidateProductId = [candidate.deviceModelData.productID unsignedIntValue]; if (candidateSoftwareVersionValid && (softwareVersion < candidateSoftwareVersion) && (softwareVersion >= candidateMinApplicableSoftwareVersion) diff --git a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm index 2e6734bea4c38f..77ca8d51a022a5 100644 --- a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm +++ b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm @@ -88,8 +88,8 @@ static bool ParseJsonFileAndPopulateCandidates( [NSNumber numberWithUnsignedLongLong:iter.get("maxApplicableSoftwareVersion", 1000).asUInt64()]; auto otaURL = [NSString stringWithUTF8String:iter.get("otaURL", "https://test.com").asCString()]; - candidate.deviceModelData.vendorId = vendorId; - candidate.deviceModelData.productId = productId; + candidate.deviceModelData.vendorID = vendorId; + candidate.deviceModelData.productID = productId; candidate.softwareVersion = softwareVersion; candidate.softwareVersionString = softwareVersionString; candidate.deviceModelData.cDVersionNumber = cDVersionNumber; @@ -246,8 +246,8 @@ static bool ParseJsonFileAndPopulateCandidates( ChipLogDetail(chipTool, "Validating image list candidate %s: ", [candidate.deviceModelData.otaURL UTF8String]); - auto vendorId = [candidate.deviceModelData.vendorId unsignedIntValue]; - auto productId = [candidate.deviceModelData.productId unsignedIntValue]; + auto vendorId = [candidate.deviceModelData.vendorID unsignedIntValue]; + auto productId = [candidate.deviceModelData.productID unsignedIntValue]; auto softwareVersion = [candidate.softwareVersion unsignedLongValue]; auto softwareVersionString = [candidate.softwareVersionString UTF8String]; auto softwareVersionStringLength = [candidate.softwareVersionString length]; diff --git a/examples/darwin-framework-tool/logging/logging.mm b/examples/darwin-framework-tool/logging/logging.mm index d57a5190be7216..a596ee0eae2a9c 100644 --- a/examples/darwin-framework-tool/logging/logging.mm +++ b/examples/darwin-framework-tool/logging/logging.mm @@ -20,45 +20,68 @@ #import "logging.h" +#include #include +#include #include namespace dft { namespace logging { - void Setup() + void LogMessage(MTRLogType type, NSString * component, NSString * message) { auto kLoggingColorError = @"\033[1;31m"; auto kLoggingColorProgress = @"\033[0;32m"; auto kLoggingColorDetail = @"\033[0;34m"; auto kLoggingColorEnd = @"\033[0m"; + NSString * loggingColor = nil; + + switch (type) { + case MTRLogTypeError: + loggingColor = kLoggingColorError; + break; + case MTRLogTypeProgress: + loggingColor = kLoggingColorProgress; + break; + case MTRLogTypeDetail: + loggingColor = kLoggingColorDetail; + break; + } + + auto formatter = [[NSDateFormatter alloc] init]; + formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss.SSS"; + auto formattedDate = [formatter stringFromDate:[NSDate date]]; + + int pid = [[NSProcessInfo processInfo] processIdentifier]; + + auto tid = pthread_mach_thread_np(pthread_self()); + + fprintf(stdout, "%s%s [%d:%u] [%s]: %s%s\n", loggingColor.UTF8String, formattedDate.UTF8String, pid, tid, + component.UTF8String, message.UTF8String, kLoggingColorEnd.UTF8String); + } + + void LogRedirectCallback(const char * moduleName, uint8_t category, const char * format, va_list args) + { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wformat-nonliteral" + // Note: Format using NSString so that '%@' placeholders are supported + NSString * message = [[NSString alloc] initWithFormat:@(format) arguments:args]; +#pragma clang diagnostic pop + + auto type = std::min(static_cast(category), MTRLogTypeDetail); + LogMessage(type, @(moduleName), message); + } + + void Setup() + { MTRSetLogCallback(MTRLogTypeDetail, ^(MTRLogType type, NSString * component, NSString * message) { - NSString * loggingColor = nil; - - switch (type) { - case MTRLogTypeError: - loggingColor = kLoggingColorError; - break; - case MTRLogTypeProgress: - loggingColor = kLoggingColorProgress; - break; - case MTRLogTypeDetail: - loggingColor = kLoggingColorDetail; - break; - } - - auto formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss.SSS"; - auto formattedDate = [formatter stringFromDate:[NSDate date]]; - - int pid = [[NSProcessInfo processInfo] processIdentifier]; - - auto tid = pthread_mach_thread_np(pthread_self()); - - fprintf(stdout, "%s%s [%d:%u] [%s]: %s%s\n", loggingColor.UTF8String, formattedDate.UTF8String, pid, tid, - component.UTF8String, message.UTF8String, kLoggingColorEnd.UTF8String); + LogMessage(type, component, message); }); + + // We also have a second copy of the logging core floating around, so + // need to set up a logging redirect on that too. + chip::Logging::SetLogRedirectCallback(&LogRedirectCallback); } } diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter index 7a6bea24441155..bc512081ede0c3 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter @@ -193,7 +193,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -226,19 +226,13 @@ client cluster Binding = 30 { } client cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -246,9 +240,15 @@ client cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -260,7 +260,7 @@ client cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -269,7 +269,7 @@ client cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -277,12 +277,12 @@ client cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -294,19 +294,13 @@ client cluster AccessControl = 31 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -314,9 +308,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -328,7 +328,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -337,7 +337,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -345,12 +345,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; 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 f6d8f6bb5ae616..60163b655d90a8 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 @@ -92,12 +92,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -105,22 +105,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -131,7 +131,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -300,7 +300,7 @@ client cluster OnOff = 6 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -330,19 +330,13 @@ server cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -350,9 +344,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -364,7 +364,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -373,7 +373,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -381,12 +381,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -464,8 +464,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -557,22 +557,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1774,7 +1774,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; 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 09d6b7f97e2568..1c7a8c37ff26b6 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 @@ -1705,7 +1705,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1741,7 +1741,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/light-switch-app/nrfconnect/prj.conf b/examples/light-switch-app/nrfconnect/prj.conf index 19f3cb266a6abc..23fa257975fe64 100644 --- a/examples/light-switch-app/nrfconnect/prj.conf +++ b/examples/light-switch-app/nrfconnect/prj.conf @@ -38,3 +38,6 @@ CONFIG_BT_DEVICE_NAME="MatterSwitch" CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n + +# Reduce application size +CONFIG_USE_SEGGER_RTT=n diff --git a/examples/light-switch-app/nrfconnect/prj_no_dfu.conf b/examples/light-switch-app/nrfconnect/prj_no_dfu.conf index 27475ce596444c..145cb9b50f835e 100644 --- a/examples/light-switch-app/nrfconnect/prj_no_dfu.conf +++ b/examples/light-switch-app/nrfconnect/prj_no_dfu.conf @@ -39,6 +39,9 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n +# Reduce application size +CONFIG_USE_SEGGER_RTT=n + # Disable Matter OTA DFU CONFIG_CHIP_OTA_REQUESTOR=n diff --git a/examples/light-switch-app/nrfconnect/prj_release.conf b/examples/light-switch-app/nrfconnect/prj_release.conf index a55449c991b17c..520a280b1e18ab 100644 --- a/examples/light-switch-app/nrfconnect/prj_release.conf +++ b/examples/light-switch-app/nrfconnect/prj_release.conf @@ -41,6 +41,7 @@ CONFIG_RESET_ON_FATAL_ERROR=y CONFIG_PM_DEVICE=y # Disable all debug features +CONFIG_USE_SEGGER_RTT=n CONFIG_SHELL=n CONFIG_OPENTHREAD_SHELL=n CONFIG_CONSOLE=n diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 2c2635d0b86ca0..7b2c429fd448c4 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -57,12 +57,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -70,22 +70,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -96,7 +96,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -150,7 +150,7 @@ server cluster OnOff = 6 { readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; + OnOffEffectIdentifier effectIdentifier = 0; OnOffDelayedAllOffEffectVariant effectVariant = 1; } @@ -273,7 +273,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -286,19 +286,13 @@ server cluster Descriptor = 29 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -306,9 +300,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -320,7 +320,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -329,7 +329,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -337,12 +337,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -420,8 +420,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -513,22 +513,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1761,7 +1761,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 04d047e1c038c3..ff918d36e23dd4 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1657,7 +1657,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1693,7 +1693,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/lighting-app/nrfconnect/prj.conf b/examples/lighting-app/nrfconnect/prj.conf index 1a796988571cf5..ad67f13edf08e3 100644 --- a/examples/lighting-app/nrfconnect/prj.conf +++ b/examples/lighting-app/nrfconnect/prj.conf @@ -46,3 +46,6 @@ CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024 CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n + +# Reduce application size +CONFIG_USE_SEGGER_RTT=n diff --git a/examples/lighting-app/nrfconnect/prj_no_dfu.conf b/examples/lighting-app/nrfconnect/prj_no_dfu.conf index 7fc72e8fcbd704..a2d0392c98b5a9 100644 --- a/examples/lighting-app/nrfconnect/prj_no_dfu.conf +++ b/examples/lighting-app/nrfconnect/prj_no_dfu.conf @@ -43,6 +43,9 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n +# Reduce application size +CONFIG_USE_SEGGER_RTT=n + # Stack size settings CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024 diff --git a/examples/lighting-app/nrfconnect/prj_release.conf b/examples/lighting-app/nrfconnect/prj_release.conf index 5ff25156b6861b..762b6d44f919c7 100644 --- a/examples/lighting-app/nrfconnect/prj_release.conf +++ b/examples/lighting-app/nrfconnect/prj_release.conf @@ -45,6 +45,7 @@ CONFIG_RESET_ON_FATAL_ERROR=y CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024 # Disable all debug features +CONFIG_USE_SEGGER_RTT=n CONFIG_SHELL=n CONFIG_OPENTHREAD_SHELL=n CONFIG_CONSOLE=n diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index af2b51c8fd8a7c..35d6253d4f3e75 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -58,12 +58,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -71,22 +71,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -97,7 +97,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -154,7 +154,7 @@ server cluster OnOff = 6 { readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; + OnOffEffectIdentifier effectIdentifier = 0; OnOffDelayedAllOffEffectVariant effectVariant = 1; } @@ -273,7 +273,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -289,19 +289,13 @@ server cluster Descriptor = 29 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -309,9 +303,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -327,7 +327,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -335,11 +335,11 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -409,8 +409,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -502,22 +502,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster GeneralCommissioning = 48 { @@ -1229,7 +1229,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index 482bbdc4c192c9..4046ea39646d67 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -1696,7 +1696,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1732,7 +1732,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/lighting-app/silabs/efr32/BUILD.gn b/examples/lighting-app/silabs/efr32/BUILD.gn index 4c2341288f3e3d..fdcadf1feb5732 100644 --- a/examples/lighting-app/silabs/efr32/BUILD.gn +++ b/examples/lighting-app/silabs/efr32/BUILD.gn @@ -100,11 +100,6 @@ defines = [] # WiFi settings if (chip_enable_wifi) { - # disabling LCD for MG24 for wifi - if (silabs_board == "BRD4186A" || silabs_board == "BRD4187A") { - show_qr_code = false - disable_lcd = true - } if (chip_default_wifi_ssid != "") { defines += [ "CHIP_ONNETWORK_PAIRING=1", diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index f325a5b3a7c55f..72510069747932 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -90,7 +90,7 @@ server cluster OnOff = 6 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -103,19 +103,13 @@ server cluster Descriptor = 29 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -123,9 +117,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -137,7 +137,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -146,7 +146,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -154,12 +154,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -237,8 +237,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -330,22 +330,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1917,7 +1917,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 0d4b608be89a9f..0c2ca2e2f67797 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1405,7 +1405,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1441,7 +1441,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index f767e5d52c6615..77d689971568c4 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -51,7 +51,7 @@ #include #include -LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); +LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); using namespace ::chip; using namespace ::chip::app; diff --git a/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp b/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp index 24b6b7709fd9b8..48ab16bb839b7d 100644 --- a/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp +++ b/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp @@ -29,7 +29,7 @@ using namespace ::chip; using namespace ::chip::app::Clusters; using namespace ::chip::app::Clusters::DoorLock; -LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); +LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) diff --git a/examples/lock-app/nrfconnect/main/main.cpp b/examples/lock-app/nrfconnect/main/main.cpp index 0c3b58e3d4f196..93a0062a0ef219 100644 --- a/examples/lock-app/nrfconnect/main/main.cpp +++ b/examples/lock-app/nrfconnect/main/main.cpp @@ -21,7 +21,7 @@ #include -LOG_MODULE_REGISTER(app, CONFIG_MATTER_LOG_LEVEL); +LOG_MODULE_REGISTER(app, CONFIG_CHIP_APP_LOG_LEVEL); using namespace ::chip; diff --git a/examples/lock-app/nrfconnect/prj.conf b/examples/lock-app/nrfconnect/prj.conf index 676ae5a05f2599..6b4864a2a486b7 100644 --- a/examples/lock-app/nrfconnect/prj.conf +++ b/examples/lock-app/nrfconnect/prj.conf @@ -35,3 +35,6 @@ CONFIG_BT_DEVICE_NAME="MatterLock" CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n + +# Reduce application size +CONFIG_USE_SEGGER_RTT=n diff --git a/examples/lock-app/nrfconnect/prj_no_dfu.conf b/examples/lock-app/nrfconnect/prj_no_dfu.conf index 839f839fc2e74f..a53431aa2dd9d7 100644 --- a/examples/lock-app/nrfconnect/prj_no_dfu.conf +++ b/examples/lock-app/nrfconnect/prj_no_dfu.conf @@ -36,6 +36,9 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n +# Reduce application size +CONFIG_USE_SEGGER_RTT=n + # Disable Matter OTA DFU CONFIG_CHIP_OTA_REQUESTOR=n diff --git a/examples/lock-app/nrfconnect/prj_release.conf b/examples/lock-app/nrfconnect/prj_release.conf index b41ed9ede98909..ba830806523ded 100644 --- a/examples/lock-app/nrfconnect/prj_release.conf +++ b/examples/lock-app/nrfconnect/prj_release.conf @@ -38,6 +38,7 @@ CONFIG_RESET_ON_FATAL_ERROR=y CONFIG_PM_DEVICE=y # Disable all debug features +CONFIG_USE_SEGGER_RTT=n CONFIG_SHELL=n CONFIG_OPENTHREAD_SHELL=n CONFIG_CONSOLE=n 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 68b7a88546071f..28341bb99c23f0 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 @@ -2,19 +2,13 @@ // It is for view/code review purposes only. server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -22,9 +16,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -36,7 +36,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -45,7 +45,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -53,12 +53,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; diff --git a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp index 41b5008fa5412c..e7715a9fb9357a 100644 --- a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp +++ b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp @@ -182,8 +182,8 @@ UserConsentSubject OTAProviderExample::GetUserConsentSubject(const app::CommandH subject.fabricIndex = commandObj->GetSubjectDescriptor().fabricIndex; subject.requestorNodeId = commandObj->GetSubjectDescriptor().subject; subject.providerEndpointId = commandPath.mEndpointId; - subject.requestorVendorId = commandData.vendorId; - subject.requestorProductId = commandData.productId; + subject.requestorVendorId = commandData.vendorID; + subject.requestorProductId = commandData.productID; subject.requestorCurrentVersion = commandData.softwareVersion; subject.requestorTargetVersion = targetVersion; if (commandData.metadataForProvider.HasValue()) @@ -341,7 +341,7 @@ void OTAProviderExample::HandleQueryImage(app::CommandHandler * commandObj, cons if (!mCandidates.empty()) // If list of OTA candidates is supplied { OTAProviderExample::DeviceSoftwareVersionModel candidate; - if (SelectOTACandidate(commandData.vendorId, commandData.productId, commandData.softwareVersion, candidate)) + if (SelectOTACandidate(commandData.vendorID, commandData.productID, commandData.softwareVersion, candidate)) { VerifyOrDie(sizeof(mSoftwareVersionString) > strlen(candidate.softwareVersionString)); 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 276b7a73991ce9..dafc45b9628fc9 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 @@ -8,7 +8,7 @@ struct LabelStruct { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -24,19 +24,13 @@ server cluster Descriptor = 29 { } client cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -44,9 +38,15 @@ client cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -58,7 +58,7 @@ client cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -67,7 +67,7 @@ client cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -75,12 +75,12 @@ client cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -90,19 +90,13 @@ client cluster AccessControl = 31 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -110,9 +104,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -124,7 +124,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -133,7 +133,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -141,12 +141,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -225,8 +225,8 @@ server cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; diff --git a/examples/ota-requestor-app/mbed/README.md b/examples/ota-requestor-app/mbed/README.md index 6e6fd542808811..38133986fda880 100644 --- a/examples/ota-requestor-app/mbed/README.md +++ b/examples/ota-requestor-app/mbed/README.md @@ -236,10 +236,10 @@ see how to use different CHIP tools to commission and control the application within a WiFi network. After commissioning is successful, announce OTA provider's presence using -`OtaSoftwareUpdateRequestor` cluster with `AnnounceOtaProvider` command. On +`OtaSoftwareUpdateRequestor` cluster with `AnnounceOTAProvider` command. On receiving this command OTA requestor will query for OTA image: - chip-device-ctrl > zcl OtaSoftwareUpdateRequestor AnnounceOtaProvider 1234 0 0 providerNodeId=1235 vendorId=9020 announcementReason=0 + chip-device-ctrl > zcl OtaSoftwareUpdateRequestor AnnounceOTAProvider 1234 0 0 providerNodeId=1235 vendorId=9020 announcementReason=0 The OTA requestor should communicate with provider, download update image and apply it. 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 5e7c2196fc5ed3..00ec6a26d82721 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 @@ -57,12 +57,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -70,22 +70,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -96,7 +96,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -150,7 +150,7 @@ server cluster OnOff = 6 { readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; + OnOffEffectIdentifier effectIdentifier = 0; OnOffDelayedAllOffEffectVariant effectVariant = 1; } @@ -170,7 +170,7 @@ server cluster OnOff = 6 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -186,19 +186,13 @@ server cluster Descriptor = 29 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -206,9 +200,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -220,7 +220,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -229,7 +229,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -237,12 +237,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -320,8 +320,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -413,22 +413,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1030,7 +1030,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; 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 ffed1259cb4982..45c956b1da3a61 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 @@ -1571,7 +1571,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1607,7 +1607,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/pigweed-app/nrfconnect/main/main.cpp b/examples/pigweed-app/nrfconnect/main/main.cpp index 78c6212929e8c7..9abede4a6f0314 100644 --- a/examples/pigweed-app/nrfconnect/main/main.cpp +++ b/examples/pigweed-app/nrfconnect/main/main.cpp @@ -28,7 +28,7 @@ #include #include -LOG_MODULE_REGISTER(app, CONFIG_MATTER_LOG_LEVEL); +LOG_MODULE_REGISTER(app, CONFIG_CHIP_APP_LOG_LEVEL); namespace { LEDWidget sStatusLED; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 7f0d172ef41925..383b1096765494 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -46,12 +46,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -59,22 +59,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -85,7 +85,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -247,7 +247,7 @@ client cluster OnOff = 6 { readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; + OnOffEffectIdentifier effectIdentifier = 0; OnOffDelayedAllOffEffectVariant effectVariant = 1; } @@ -308,7 +308,7 @@ server cluster OnOff = 6 { readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; + OnOffEffectIdentifier effectIdentifier = 0; OnOffDelayedAllOffEffectVariant effectVariant = 1; } @@ -418,7 +418,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 7f0d172ef41925..383b1096765494 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -46,12 +46,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -59,22 +59,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -85,7 +85,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -247,7 +247,7 @@ client cluster OnOff = 6 { readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; + OnOffEffectIdentifier effectIdentifier = 0; OnOffDelayedAllOffEffectVariant effectVariant = 1; } @@ -308,7 +308,7 @@ server cluster OnOff = 6 { readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; + OnOffEffectIdentifier effectIdentifier = 0; OnOffDelayedAllOffEffectVariant effectVariant = 1; } @@ -418,7 +418,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } diff --git a/examples/platform/nrfconnect/Rpc.cpp b/examples/platform/nrfconnect/Rpc.cpp index c9961063e0407f..5b76dc3f7e7d76 100644 --- a/examples/platform/nrfconnect/Rpc.cpp +++ b/examples/platform/nrfconnect/Rpc.cpp @@ -26,7 +26,7 @@ #include -LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); +LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); #if defined(PW_RPC_ATTRIBUTE_SERVICE) && PW_RPC_ATTRIBUTE_SERVICE #include "pigweed/rpc_services/Attributes.h" diff --git a/examples/platform/nrfconnect/util/PWMDevice.cpp b/examples/platform/nrfconnect/util/PWMDevice.cpp index b51d33c8e0ac7d..2d17d31e4e703e 100644 --- a/examples/platform/nrfconnect/util/PWMDevice.cpp +++ b/examples/platform/nrfconnect/util/PWMDevice.cpp @@ -26,7 +26,7 @@ #include #include -LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); +LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); int PWMDevice::Init(const pwm_dt_spec * aPWMDevice, uint8_t aMinLevel, uint8_t aMaxLevel, uint8_t aDefaultLevel) { diff --git a/examples/pump-app/nrfconnect/prj.conf b/examples/pump-app/nrfconnect/prj.conf index 3195f884e65720..3013e7d7aec421 100644 --- a/examples/pump-app/nrfconnect/prj.conf +++ b/examples/pump-app/nrfconnect/prj.conf @@ -14,9 +14,6 @@ # limitations under the License. # -CONFIG_CHIP=y -CONFIG_STD_CPP14=y - # This sample uses Kconfig.defaults to set options common for all # samples. This file should contain only options specific for this sample # or overrides of default values. @@ -38,3 +35,6 @@ CONFIG_BT_DEVICE_NAME="MatterPump" CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n + +# Reduce application size +CONFIG_USE_SEGGER_RTT=n diff --git a/examples/pump-app/nrfconnect/prj_no_dfu.conf b/examples/pump-app/nrfconnect/prj_no_dfu.conf index 67c31871ce797f..a0d3f8b1a879c2 100644 --- a/examples/pump-app/nrfconnect/prj_no_dfu.conf +++ b/examples/pump-app/nrfconnect/prj_no_dfu.conf @@ -36,6 +36,9 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n +# Reduce application size +CONFIG_USE_SEGGER_RTT=n + # Disable Matter OTA DFU CONFIG_CHIP_OTA_REQUESTOR=n diff --git a/examples/pump-app/nrfconnect/prj_release.conf b/examples/pump-app/nrfconnect/prj_release.conf index adb09f72ef3db2..540c77354fa82f 100644 --- a/examples/pump-app/nrfconnect/prj_release.conf +++ b/examples/pump-app/nrfconnect/prj_release.conf @@ -38,6 +38,7 @@ CONFIG_RESET_ON_FATAL_ERROR=y CONFIG_PM_DEVICE=y # Disable all debug features +CONFIG_USE_SEGGER_RTT=n CONFIG_SHELL=n CONFIG_OPENTHREAD_SHELL=n CONFIG_CONSOLE=n diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index f48ce24db8d6b4..9f7d9dd521d959 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -184,7 +184,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -217,19 +217,13 @@ server cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -237,9 +231,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -251,7 +251,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -260,7 +260,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -268,12 +268,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -352,8 +352,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -445,7 +445,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; @@ -455,15 +455,15 @@ server cluster OtaSoftwareUpdateRequestor = 42 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster GeneralCommissioning = 48 { @@ -1301,7 +1301,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 934fe71be55faf..afde1ae3664bf4 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -1707,7 +1707,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1725,7 +1725,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/pump-controller-app/nrfconnect/prj.conf b/examples/pump-controller-app/nrfconnect/prj.conf index 4a38ec1177c699..5b9c2baff8ee9e 100644 --- a/examples/pump-controller-app/nrfconnect/prj.conf +++ b/examples/pump-controller-app/nrfconnect/prj.conf @@ -35,3 +35,6 @@ CONFIG_BT_DEVICE_NAME="MatterPumpCtrl" CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n + +# Reduce application size +CONFIG_USE_SEGGER_RTT=n diff --git a/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf b/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf index dba7042ad82864..d6632fe9172638 100644 --- a/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf +++ b/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf @@ -37,6 +37,9 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n +# Reduce application size +CONFIG_USE_SEGGER_RTT=n + # Disable Matter OTA DFU CONFIG_CHIP_OTA_REQUESTOR=n diff --git a/examples/pump-controller-app/nrfconnect/prj_release.conf b/examples/pump-controller-app/nrfconnect/prj_release.conf index 88ea95c777e1a1..fc3b092b655c8f 100644 --- a/examples/pump-controller-app/nrfconnect/prj_release.conf +++ b/examples/pump-controller-app/nrfconnect/prj_release.conf @@ -39,6 +39,7 @@ CONFIG_RESET_ON_FATAL_ERROR=y CONFIG_PM_DEVICE=y # Disable all debug features +CONFIG_USE_SEGGER_RTT=n CONFIG_SHELL=n CONFIG_OPENTHREAD_SHELL=n CONFIG_CONSOLE=n 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 b5e2093a66a48b..fbbb3ad0e1a546 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 @@ -83,7 +83,7 @@ client cluster OnOff = 6 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -116,19 +116,13 @@ server cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -136,9 +130,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -150,7 +150,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -159,7 +159,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -167,12 +167,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -251,8 +251,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -344,7 +344,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; @@ -354,15 +354,15 @@ server cluster OtaSoftwareUpdateRequestor = 42 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster GeneralCommissioning = 48 { @@ -1157,7 +1157,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = true; ram attribute updateState; ram attribute updateStateProgress; 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 dc3a4bc206d159..ba5eddb46d3f84 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 @@ -1655,7 +1655,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1673,7 +1673,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 52b56ed2c4f91d..bf88563db716ce 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -8,7 +8,7 @@ struct LabelStruct { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -21,19 +21,13 @@ server cluster Descriptor = 29 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -41,9 +35,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -55,7 +55,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -64,7 +64,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -72,12 +72,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 60a9c708e1cfc0..28f3870a5a281c 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -86,12 +86,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -99,22 +99,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -125,7 +125,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -246,7 +246,7 @@ server cluster Scenes = 5 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -273,19 +273,13 @@ server cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -293,9 +287,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -307,7 +307,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -316,7 +316,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -324,12 +324,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -408,8 +408,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -501,22 +501,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1550,7 +1550,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index d83a9d05c6b9bc..6047acaa680278 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1623,7 +1623,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1675,7 +1675,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 904b841097fd33..98b68bf8f34b43 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -154,7 +154,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -195,19 +195,13 @@ server cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -215,9 +209,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -229,7 +229,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -238,7 +238,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -246,12 +246,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -330,8 +330,8 @@ server cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; diff --git a/examples/tv-casting-app/android/args.gni b/examples/tv-casting-app/android/args.gni index 802f54f8b49484..e3a20c5055dd91 100644 --- a/examples/tv-casting-app/android/args.gni +++ b/examples/tv-casting-app/android/args.gni @@ -29,3 +29,5 @@ chip_build_libshell = true chip_enable_additional_data_advertising = true chip_enable_rotating_device_id = true + +chip_config_network_layer_ble = false diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj index d85d5a6f2d4f91..ef0579eca8eb50 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj @@ -26,6 +26,7 @@ 3CCB8742286A593700771BAD /* ConversionUtils.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3CCB873C286A593700771BAD /* ConversionUtils.hpp */; }; 3CCB8743286A593700771BAD /* CastingServerBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CCB873D286A593700771BAD /* CastingServerBridge.mm */; }; 3CCB8744286A593700771BAD /* ConversionUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CCB873E286A593700771BAD /* ConversionUtils.mm */; }; + 3CE868F42946D76200FCB92B /* CommissionableDataProviderImpl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */; }; 3CF8532728E37F1000F07B9F /* MatterError.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CF8532628E37F1000F07B9F /* MatterError.mm */; }; /* End PBXBuildFile section */ @@ -59,6 +60,7 @@ 3CCB873C286A593700771BAD /* ConversionUtils.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ConversionUtils.hpp; sourceTree = ""; }; 3CCB873D286A593700771BAD /* CastingServerBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CastingServerBridge.mm; sourceTree = ""; }; 3CCB873E286A593700771BAD /* ConversionUtils.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ConversionUtils.mm; sourceTree = ""; }; + 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CommissionableDataProviderImpl.mm; sourceTree = ""; }; 3CF8532528E37ED800F07B9F /* MatterError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MatterError.h; sourceTree = ""; }; 3CF8532628E37F1000F07B9F /* MatterError.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MatterError.mm; sourceTree = ""; }; /* End PBXFileReference section */ @@ -125,6 +127,7 @@ 3C26AC8B2926FE0C00BA6881 /* DeviceAttestationCredentialsProviderImpl.hpp */, 3C26AC8F2927008900BA6881 /* DeviceAttestationCredentialsProviderImpl.mm */, 3C0D9CDF2920A30C00D3332B /* CommissionableDataProviderImpl.hpp */, + 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */, ); path = MatterTvCastingBridge; sourceTree = ""; @@ -241,6 +244,7 @@ 3CCB8744286A593700771BAD /* ConversionUtils.mm in Sources */, 3C4E53B028E4F28100F293E8 /* MediaPlaybackTypes.mm in Sources */, 3C66FBFC290327BB00B63FE7 /* AppParameters.mm in Sources */, + 3CE868F42946D76200FCB92B /* CommissionableDataProviderImpl.mm in Sources */, 3C26AC9329282B8100BA6881 /* DeviceAttestationCredentialsHolder.m in Sources */, 3C26AC902927008900BA6881 /* DeviceAttestationCredentialsProviderImpl.mm in Sources */, 3CCB873F286A593700771BAD /* DiscoveredNodeData.mm in Sources */, diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/AppParameters.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/AppParameters.h index 929722387a7388..9e445e25fa63d7 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/AppParameters.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/AppParameters.h @@ -31,9 +31,9 @@ @property uint32_t spake2pIterationCount; -@property NSData * spake2pSalt; +@property NSData * spake2pSaltBase64; -@property NSData * spake2pVerifier; +@property NSData * spake2pVerifierBase64; @property DeviceAttestationCredentialsHolder * deviceAttestationCredentials; diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h index 8c8f8c83e71849..8f1d7d17bf95ac 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h @@ -54,7 +54,7 @@ @param clientQueue Queue to dispatch the call to the discoveredCommissionerHandler on - @param discoveredCommissionerHandler Handler to call after a discovered commissioner has been retrieved + @param discoveredCommissionerHandler Handler called synchronously after a discovered commissioner has been retrieved */ - (void)getDiscoveredCommissioner:(int)index clientQueue:(dispatch_queue_t _Nonnull)clientQueue @@ -184,6 +184,16 @@ */ - (void)disconnect:(dispatch_queue_t _Nonnull)clientQueue requestSentHandler:(nullable void (^)())requestSentHandler; +/** + @brief Start the Matter server and reconnect to a previously connected Video Player (if any) + */ +- (void)startMatterServer; + +/** + @brief Stop the Matter server + */ +- (void)stopMatterServer; + /*! @brief Send a ContentLauncher:LaunchURL request to a TV diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm index d2620f6ca69e01..cd860847c4b300 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm @@ -38,10 +38,14 @@ @interface CastingServerBridge () @property OnboardingPayload * _Nonnull onboardingPayload; -@property chip::DeviceLayer::CommissionableDataProviderImpl * commissionableDataProvider; +@property CommissionableDataProviderImpl * commissionableDataProvider; @property chip::Credentials::DeviceAttestationCredentialsProvider * deviceAttestationCredentialsProvider; +@property chip::CommonCaseDeviceServerInitParams * serverInitParams; + +@property TargetVideoPlayerInfo * previouslyConnectedVideoPlayer; + // queue used to serialize all work performed by the CastingServerBridge @property (atomic) dispatch_queue_t chipWorkQueue; @@ -111,10 +115,15 @@ - (void)initApp:(AppParameters * _Nullable)appParameters ChipLogProgress(AppServer, "CastingServerBridge().initApp() called"); CHIP_ERROR err = CHIP_NO_ERROR; - _commissionableDataProvider = new chip::DeviceLayer::CommissionableDataProviderImpl(); + _commissionableDataProvider = new CommissionableDataProviderImpl(); _deviceAttestationCredentialsProvider = chip::Credentials::Examples::GetExampleDACProvider(); + _appParameters = appParameters; AppParams cppAppParams; + uint32_t setupPasscode = CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE; + uint16_t setupDiscriminator = CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR; + uint32_t spake2pIterationCount; + chip::ByteSpan spake2pSaltSpan, spake2pVerifierSpan; if (_appParameters != nil) { err = [ConversionUtils convertToCppAppParamsInfoFrom:_appParameters outAppParams:cppAppParams]; if (err != CHIP_NO_ERROR) { @@ -123,22 +132,31 @@ - (void)initApp:(AppParameters * _Nullable)appParameters } // set fields in commissionableDataProvider - _commissionableDataProvider->SetSpake2pIterationCount(_appParameters.spake2pIterationCount); - if (_appParameters.spake2pSalt != nil) { - chip::ByteSpan spake2pSaltSpan - = chip::ByteSpan(static_cast(_appParameters.spake2pSalt.bytes), _appParameters.spake2pSalt.length); - _commissionableDataProvider->SetSpake2pSalt(spake2pSaltSpan); + if (_appParameters.onboardingPayload != nil) { + setupPasscode = _appParameters.onboardingPayload.setupPasscode > 0 ? _appParameters.onboardingPayload.setupPasscode + : CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE; + setupDiscriminator = _appParameters.onboardingPayload.setupDiscriminator > 0 + ? _appParameters.onboardingPayload.setupDiscriminator + : CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR; + } + spake2pIterationCount = _appParameters.spake2pIterationCount; + if (_appParameters.spake2pSaltBase64 != nil) { + spake2pSaltSpan = chip::ByteSpan( + static_cast(_appParameters.spake2pSaltBase64.bytes), _appParameters.spake2pSaltBase64.length); } - if (_appParameters.spake2pVerifier != nil) { - chip::ByteSpan spake2pVerifierSpan = chip::ByteSpan( - static_cast(_appParameters.spake2pVerifier.bytes), _appParameters.spake2pVerifier.length); - _commissionableDataProvider->SetSpake2pSalt(spake2pVerifierSpan); + if (_appParameters.spake2pVerifierBase64 != nil) { + chip::ByteSpan spake2pVerifierSpan + = chip::ByteSpan(static_cast(_appParameters.spake2pVerifierBase64.bytes), + _appParameters.spake2pVerifierBase64.length); } - if (_appParameters.onboardingPayload != nil) { - _commissionableDataProvider->SetSetupPasscode(_appParameters.onboardingPayload.setupPasscode); - _commissionableDataProvider->SetSetupDiscriminator(_appParameters.onboardingPayload.setupDiscriminator); + err = _commissionableDataProvider->Initialize(_appParameters.spake2pVerifierBase64 != nil ? &spake2pVerifierSpan : nil, + _appParameters.spake2pSaltBase64 != nil ? &spake2pSaltSpan : nil, spake2pIterationCount, setupPasscode, + setupDiscriminator); + if (err != CHIP_NO_ERROR) { + ChipLogError(AppServer, "Failed to initialize CommissionableDataProvider: %s", ErrorStr(err)); + return; } if (_appParameters.deviceAttestationCredentials != nil) { @@ -182,8 +200,6 @@ - (void)initApp:(AppParameters * _Nullable)appParameters } chip::DeviceLayer::SetCommissionableDataProvider(_commissionableDataProvider); - uint32_t setupPasscode = 0; - uint16_t setupDiscriminator = 0; _commissionableDataProvider->GetSetupPasscode(setupPasscode); _commissionableDataProvider->GetSetupDiscriminator(setupDiscriminator); _onboardingPayload = [[OnboardingPayload alloc] initWithSetupPasscode:setupPasscode setupDiscriminator:setupDiscriminator]; @@ -199,14 +215,14 @@ - (void)initApp:(AppParameters * _Nullable)appParameters } // init app Server - static chip::CommonCaseDeviceServerInitParams initParams; - err = initParams.InitializeStaticResourcesBeforeServerInit(); + _serverInitParams = new chip::CommonCaseDeviceServerInitParams(); + err = _serverInitParams->InitializeStaticResourcesBeforeServerInit(); if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "InitializeStaticResourcesBeforeServerInit failed: %s", ErrorStr(err)); return; } - err = chip::Server::GetInstance().Init(initParams); + err = chip::Server::GetInstance().Init(*_serverInitParams); if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "chip::Server init failed: %s", ErrorStr(err)); return; @@ -261,7 +277,7 @@ - (void)getDiscoveredCommissioner:(int)index { ChipLogProgress(AppServer, "CastingServerBridge().getDiscoveredCommissioner() called"); - dispatch_async(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^{ chip::Optional associatedConnectableVideoPlayer; DiscoveredNodeData * commissioner = nil; const chip::Dnssd::DiscoveredNodeData * cppDiscoveredNodeData @@ -275,7 +291,7 @@ - (void)getDiscoveredCommissioner:(int)index } } - dispatch_async(clientQueue, ^{ + dispatch_sync(clientQueue, ^{ discoveredCommissionerHandler(commissioner); }); }); @@ -407,10 +423,9 @@ - (void)getActiveTargetVideoPlayers:(dispatch_queue_t _Nonnull)clientQueue ChipLogProgress(AppServer, "CastingServerBridge().getActiveTargetVideoPlayers() called"); dispatch_async(_chipWorkQueue, ^{ - NSMutableArray * videoPlayers = nil; + NSMutableArray * videoPlayers = [NSMutableArray new]; TargetVideoPlayerInfo * cppTargetVideoPlayerInfo = CastingServer::GetInstance()->GetActiveTargetVideoPlayer(); - if (cppTargetVideoPlayerInfo != nullptr) { - videoPlayers = [NSMutableArray new]; + if (cppTargetVideoPlayerInfo != nullptr && cppTargetVideoPlayerInfo->IsInitialized()) { videoPlayers[0] = [ConversionUtils convertToObjCVideoPlayerFrom:cppTargetVideoPlayerInfo]; } @@ -495,6 +510,79 @@ - (void)shutdownAllSubscriptions:(dispatch_queue_t _Nonnull)clientQueue requestS }); } +- (void)startMatterServer +{ + ChipLogProgress(AppServer, "CastingServerBridge().startMatterServer() called"); + + dispatch_sync(_chipWorkQueue, ^{ + // Initialize the Matter server + CHIP_ERROR err = chip::Server::GetInstance().Init(*self->_serverInitParams); + if (err != CHIP_NO_ERROR) { + ChipLogError(AppServer, "chip::Server init failed: %s", ErrorStr(err)); + return; + } + + // Now reconnect to the VideoPlayer the casting app was previously connected to (if any) + if (self->_previouslyConnectedVideoPlayer != nil) { + ChipLogProgress( + AppServer, "CastingServerBridge().startMatterServer() reconnecting to previously connected VideoPlayer..."); + err = CastingServer::GetInstance()->VerifyOrEstablishConnection( + *(self->_previouslyConnectedVideoPlayer), [](TargetVideoPlayerInfo * cppTargetVideoPlayerInfo) {}, + [](CHIP_ERROR err) {}, [](TargetEndpointInfo * cppTargetEndpointInfo) {}); + } + }); +} + +- (void)stopMatterServer +{ + ChipLogProgress(AppServer, "CastingServerBridge().stopMatterServer() called"); + + dispatch_sync(_chipWorkQueue, ^{ + // capture pointer to previouslyConnectedVideoPlayer, to be deleted + TargetVideoPlayerInfo * videoPlayerForDeletion + = self->_previouslyConnectedVideoPlayer == nil ? nil : self->_previouslyConnectedVideoPlayer; + + // On shutting down the Matter server, the casting app will be automatically disconnected from any Video Players it was + // connected to. Save the VideoPlayer that the casting app was targetting and connected to, so we can reconnect to it on + // re-starting the Matter server. + TargetVideoPlayerInfo * currentTargetVideoPlayerInfo = CastingServer::GetInstance()->GetActiveTargetVideoPlayer(); + if (currentTargetVideoPlayerInfo != nil && currentTargetVideoPlayerInfo->IsInitialized() + && currentTargetVideoPlayerInfo->GetOperationalDeviceProxy() != nil) { + self->_previouslyConnectedVideoPlayer = new TargetVideoPlayerInfo(); + self->_previouslyConnectedVideoPlayer->Initialize(currentTargetVideoPlayerInfo->GetNodeId(), + currentTargetVideoPlayerInfo->GetFabricIndex(), nullptr, nullptr, currentTargetVideoPlayerInfo->GetVendorId(), + currentTargetVideoPlayerInfo->GetProductId(), currentTargetVideoPlayerInfo->GetDeviceType(), + currentTargetVideoPlayerInfo->GetDeviceName(), currentTargetVideoPlayerInfo->GetNumIPs(), + const_cast(currentTargetVideoPlayerInfo->GetIpAddresses())); + + TargetEndpointInfo * prevEndpoints = self->_previouslyConnectedVideoPlayer->GetEndpoints(); + if (prevEndpoints != nullptr) { + for (size_t i = 0; i < kMaxNumberOfEndpoints; i++) { + prevEndpoints[i].Reset(); + } + } + TargetEndpointInfo * currentEndpoints = currentTargetVideoPlayerInfo->GetEndpoints(); + for (size_t i = 0; i < kMaxNumberOfEndpoints && currentEndpoints[i].IsInitialized(); i++) { + prevEndpoints[i].Initialize(currentEndpoints[i].GetEndpointId()); + chip::ClusterId * currentClusters = currentEndpoints[i].GetClusters(); + for (size_t j = 0; j < kMaxNumberOfClustersPerEndpoint && currentClusters[j] != chip::kInvalidClusterId; j++) { + prevEndpoints[i].AddCluster(currentClusters[j]); + } + } + } else { + self->_previouslyConnectedVideoPlayer = nil; + } + + // Now shutdown the Matter server + chip::Server::GetInstance().Shutdown(); + + // Delete the old previouslyConnectedVideoPlayer, if non-nil + if (videoPlayerForDeletion != nil) { + delete videoPlayerForDeletion; + } + }); +} + - (void)disconnect:(dispatch_queue_t _Nonnull)clientQueue requestSentHandler:(nullable void (^)())requestSentHandler { ChipLogProgress(AppServer, "CastingServerBridge().disconnect() called"); diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissionableDataProviderImpl.hpp b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissionableDataProviderImpl.hpp index b05ce4aa89a4ef..979c7c72f5e057 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissionableDataProviderImpl.hpp +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissionableDataProviderImpl.hpp @@ -1,6 +1,7 @@ -/** +/* * - * Copyright (c) 2020-2022 Project CHIP Authors + * 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. @@ -15,166 +16,47 @@ * limitations under the License. */ -#ifndef CommissionableDataProviderImpl_h -#define CommissionableDataProviderImpl_h - #pragma once #include -#include +#include #include +#include +#include -namespace chip { -namespace DeviceLayer { - -class CommissionableDataProviderImpl : public CommissionableDataProvider +class CommissionableDataProviderImpl : public chip::DeviceLayer::CommissionableDataProvider { public: - CommissionableDataProviderImpl() {} - - CHIP_ERROR GetSetupPasscode(uint32_t & setupPasscode) override - { - if (mSetupPasscode > 0) - { - setupPasscode = mSetupPasscode; - } - else - { - setupPasscode = kDefaultTestPasscode; - } - - return CHIP_NO_ERROR; - } - - CHIP_ERROR SetSetupPasscode(uint32_t setupPasscode) override - { - mSetupPasscode = setupPasscode; - return CHIP_NO_ERROR; - } - - CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override - { - if (mSetupDiscriminator > 0) - { - setupDiscriminator = mSetupDiscriminator; - } - else - { - setupDiscriminator = kDefaultTestDiscriminator; - } - - return CHIP_NO_ERROR; - } - + CHIP_ERROR Initialize(chip::ByteSpan * spake2pVerifierBase64, chip::ByteSpan * spake2pSaltBase64, + uint32_t spake2pIterationCount, uint32_t setupPasscode, uint16_t discriminator); + CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override; CHIP_ERROR SetSetupDiscriminator(uint16_t setupDiscriminator) override { - mSetupDiscriminator = setupDiscriminator; - return CHIP_NO_ERROR; - } - - CHIP_ERROR GetSpake2pIterationCount(uint32_t & iterationCount) override - { - if (mSpake2pIterationCount > 0) - { - iterationCount = mSpake2pIterationCount; - } - else - { - iterationCount = kDefaultTestVerifierIterationCount; - } - - return CHIP_NO_ERROR; - } - - CHIP_ERROR SetSpake2pIterationCount(uint32_t iterationCount) - { - mSpake2pIterationCount = iterationCount; - return CHIP_NO_ERROR; + // We don't support overriding the discriminator post-init (it is deprecated!) + return CHIP_ERROR_NOT_IMPLEMENTED; } - - CHIP_ERROR GetSpake2pSalt(MutableByteSpan & saltBuf) override - { - size_t saltLen = mSpake2pSalt.data() == nullptr ? sizeof(kDefaultTestVerifierSalt) : mSpake2pSalt.size(); - if (saltBuf.size() < saltLen) - { - return CHIP_ERROR_BUFFER_TOO_SMALL; - } - - memcpy(saltBuf.data(), mSpake2pSalt.data() == nullptr ? kDefaultTestVerifierSalt : mSpake2pSalt.data(), saltLen); - saltBuf.reduce_size(saltLen); - return CHIP_NO_ERROR; - } - - CHIP_ERROR SetSpake2pSalt(ByteSpan saltBuf) - { - size_t saltLen = saltBuf.size(); - if (chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length < saltLen) - { - return CHIP_ERROR_BUFFER_TOO_SMALL; - } - - mSpake2pSalt = MutableByteSpan(mSpake2pSaltBuf, chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length); - - memcpy(mSpake2pSalt.data(), saltBuf.data(), saltLen); - mSpake2pSalt.reduce_size(saltLen); - return CHIP_NO_ERROR; - } - - CHIP_ERROR GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & outVerifierLen) override - { - outVerifierLen = mSpake2pVerifier.data() == nullptr ? sizeof(kDefaultTestVerifier) : mSpake2pVerifier.size(); - if (verifierBuf.size() < outVerifierLen) - { - return CHIP_ERROR_BUFFER_TOO_SMALL; - } - memcpy(verifierBuf.data(), mSpake2pVerifier.data() == nullptr ? kDefaultTestVerifier : mSpake2pVerifier.data(), - outVerifierLen); - verifierBuf.reduce_size(outVerifierLen); - return CHIP_NO_ERROR; - } - - CHIP_ERROR SetSpake2pVerifier(MutableByteSpan verifierBuf) + CHIP_ERROR GetSpake2pIterationCount(uint32_t & iterationCount) override; + CHIP_ERROR GetSpake2pSalt(chip::MutableByteSpan & saltBuf) override; + CHIP_ERROR GetSpake2pVerifier(chip::MutableByteSpan & verifierBuf, size_t & outVerifierLen) override; + CHIP_ERROR GetSetupPasscode(uint32_t & setupPasscode) override; + CHIP_ERROR SetSetupPasscode(uint32_t setupPasscode) override { - size_t inVerifierBufLen = verifierBuf.size(); - if (chip::Crypto::kSpake2p_VerifierSerialized_Length < inVerifierBufLen) - { - return CHIP_ERROR_BUFFER_TOO_SMALL; - } - - mSpake2pVerifier = MutableByteSpan(mSpake2pSaltBuf, chip::Crypto::kSpake2p_VerifierSerialized_Length); - - memcpy(mSpake2pVerifier.data(), verifierBuf.data(), inVerifierBufLen); - mSpake2pVerifier.reduce_size(inVerifierBufLen); - return CHIP_NO_ERROR; + // We don't support overriding the passcode post-init (it is deprecated!) + return CHIP_ERROR_NOT_IMPLEMENTED; } private: - static constexpr uint32_t kDefaultTestPasscode = 20202021; - static constexpr uint16_t kDefaultTestDiscriminator = 3840; - static constexpr uint32_t kDefaultTestVerifierIterationCount = 1000; - static constexpr uint8_t kDefaultTestVerifierSalt[16] = { - 0x53, 0x50, 0x41, 0x4b, 0x45, 0x32, 0x50, 0x20, 0x4b, 0x65, 0x79, 0x20, 0x53, 0x61, 0x6c, 0x74, - }; - static constexpr uint8_t kDefaultTestVerifier[97] = { - 0xb9, 0x61, 0x70, 0xaa, 0xe8, 0x03, 0x34, 0x68, 0x84, 0x72, 0x4f, 0xe9, 0xa3, 0xb2, 0x87, 0xc3, 0x03, 0x30, 0xc2, 0xa6, - 0x60, 0x37, 0x5d, 0x17, 0xbb, 0x20, 0x5a, 0x8c, 0xf1, 0xae, 0xcb, 0x35, 0x04, 0x57, 0xf8, 0xab, 0x79, 0xee, 0x25, 0x3a, - 0xb6, 0xa8, 0xe4, 0x6b, 0xb0, 0x9e, 0x54, 0x3a, 0xe4, 0x22, 0x73, 0x6d, 0xe5, 0x01, 0xe3, 0xdb, 0x37, 0xd4, 0x41, 0xfe, - 0x34, 0x49, 0x20, 0xd0, 0x95, 0x48, 0xe4, 0xc1, 0x82, 0x40, 0x63, 0x0c, 0x4f, 0xf4, 0x91, 0x3c, 0x53, 0x51, 0x38, 0x39, - 0xb7, 0xc0, 0x7f, 0xcc, 0x06, 0x27, 0xa1, 0xb8, 0x57, 0x3a, 0x14, 0x9f, 0xcd, 0x1f, 0xa4, 0x66, 0xcf, - }; - - uint32_t mSetupPasscode = 0; - uint16_t mSetupDiscriminator = 0; - uint32_t mSpake2pIterationCount = 0; - - uint8_t mSpake2pSaltBuf[chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length]; - MutableByteSpan mSpake2pSalt; - - MutableByteSpan mSpake2pVerifier; - uint8_t mSpake2pVerifierBuf[chip::Crypto::kSpake2p_VerifierSerialized_Length]; + friend CommissionableDataProviderImpl & CommissionableDataProviderMgrImpl(); + static CommissionableDataProviderImpl sInstance; + bool mFirstUpdated = false; + std::vector mSerializedPaseVerifier; + std::vector mPaseSalt; + uint32_t mPaseIterationCount = 0; + chip::Optional mSetupPasscode; + uint16_t mDiscriminator = 0; }; -} // namespace DeviceLayer -} // namespace chip - -#endif /* CommissionableDataProviderImpl_h */ +inline CommissionableDataProviderImpl & CommissionableDataProviderMgrImpl() +{ + return CommissionableDataProviderImpl::sInstance; +} diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissionableDataProviderImpl.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissionableDataProviderImpl.mm new file mode 100644 index 00000000000000..c1e7c6ef9b6120 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissionableDataProviderImpl.mm @@ -0,0 +1,205 @@ +/* + * + * 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 "CommissionableDataProviderImpl.hpp" + +#include +#include + +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::Crypto; + +namespace { + +CHIP_ERROR GeneratePaseSalt(std::vector & spake2pSaltVector) +{ + constexpr size_t kSaltLen = kSpake2p_Max_PBKDF_Salt_Length; + spake2pSaltVector.resize(kSaltLen); + return DRBG_get_bytes(spake2pSaltVector.data(), spake2pSaltVector.size()); +} + +} // namespace + +CommissionableDataProviderImpl CommissionableDataProviderImpl::sInstance; + +CHIP_ERROR CommissionableDataProviderImpl::Initialize(chip::ByteSpan * spake2pVerifierBase64, chip::ByteSpan * spake2pSaltBase64, + uint32_t spake2pIterationCount, uint32_t setupPasscode, uint16_t discriminator) +{ + VerifyOrReturnLogError(discriminator <= chip::kMaxDiscriminatorValue, CHIP_ERROR_INVALID_ARGUMENT); + + if (spake2pIterationCount == 0) { + spake2pIterationCount = CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT; + } + VerifyOrReturnLogError( + static_cast(spake2pIterationCount) >= kSpake2p_Min_PBKDF_Iterations, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnLogError( + static_cast(spake2pIterationCount) <= kSpake2p_Max_PBKDF_Iterations, CHIP_ERROR_INVALID_ARGUMENT); + + const bool havePaseVerifier = (spake2pVerifierBase64 != nullptr); + const bool havePaseSalt = (spake2pSaltBase64 != nullptr); + VerifyOrReturnLogError(!havePaseVerifier || (havePaseVerifier && havePaseSalt), CHIP_ERROR_INVALID_ARGUMENT); + + CHIP_ERROR err; + // read verifier from paramter if provided + Spake2pVerifier providedVerifier; + std::vector serializedSpake2pVerifier(kSpake2p_VerifierSerialized_Length); + if (havePaseVerifier) { + size_t maxBase64Size = BASE64_ENCODED_LEN(chip::Crypto::kSpake2p_VerifierSerialized_Length); + VerifyOrReturnLogError(static_cast(spake2pVerifierBase64->size()) <= maxBase64Size, CHIP_ERROR_INVALID_ARGUMENT); + + size_t decodedLen = chip::Base64Decode32(reinterpret_cast(spake2pVerifierBase64->data()), + static_cast(spake2pVerifierBase64->size()), reinterpret_cast(serializedSpake2pVerifier.data())); + VerifyOrReturnLogError(decodedLen == chip::Crypto::kSpake2p_VerifierSerialized_Length, CHIP_ERROR_INVALID_ARGUMENT); + + chip::MutableByteSpan verifierSpan { serializedSpake2pVerifier.data(), decodedLen }; + err = providedVerifier.Deserialize(verifierSpan); + VerifyOrReturnLogError(err == CHIP_NO_ERROR, err); + + ChipLogProgress(Support, "Got externally provided verifier, using it."); + } + + // read salt from paramter if provided or generate one + std::vector spake2pSalt(chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length); + if (!havePaseSalt) { + ChipLogProgress(Support, "CommissionableDataProviderImpl didn't get a PASE salt, generating one."); + err = GeneratePaseSalt(spake2pSalt); + VerifyOrReturnLogError(err == CHIP_NO_ERROR, err); + } else { + size_t maxBase64Size = BASE64_ENCODED_LEN(chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length); + VerifyOrReturnLogError(static_cast(spake2pSaltBase64->size()) <= maxBase64Size, CHIP_ERROR_INVALID_ARGUMENT); + + size_t decodedLen = chip::Base64Decode32(reinterpret_cast(spake2pSaltBase64->data()), + static_cast(spake2pSaltBase64->size()), reinterpret_cast(spake2pSalt.data())); + VerifyOrReturnLogError(decodedLen >= chip::Crypto::kSpake2p_Min_PBKDF_Salt_Length + && decodedLen <= chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length, + CHIP_ERROR_INVALID_ARGUMENT); + spake2pSalt.resize(decodedLen); + } + + // generate verifier from passcode if provided + const bool havePasscode = (setupPasscode > kMinSetupPasscode && setupPasscode < kMaxSetupPasscode); + Spake2pVerifier passcodeVerifier; + std::vector serializedPasscodeVerifier(kSpake2p_VerifierSerialized_Length); + chip::MutableByteSpan saltSpan { spake2pSalt.data(), spake2pSalt.size() }; + if (havePasscode) { + uint32_t u32SetupPasscode = static_cast(setupPasscode); + err = passcodeVerifier.Generate(spake2pIterationCount, saltSpan, u32SetupPasscode); + VerifyOrReturnLogError(err == CHIP_NO_ERROR, err); + + chip::MutableByteSpan verifierSpan { serializedPasscodeVerifier.data(), serializedPasscodeVerifier.size() }; + err = passcodeVerifier.Serialize(verifierSpan); + VerifyOrReturnLogError(err == CHIP_NO_ERROR, err); + } + + // Make sure we actually have a verifier + VerifyOrReturnLogError(havePasscode || havePaseVerifier, CHIP_ERROR_INVALID_ARGUMENT); + + // If both passcode and external verifier were provided, validate they match, otherwise + // it's ambiguous. + if (havePasscode && havePaseVerifier) { + VerifyOrReturnLogError(serializedPasscodeVerifier == serializedSpake2pVerifier, CHIP_ERROR_INVALID_ARGUMENT); + ChipLogProgress(Support, "Validated externally provided passcode matches the one generated from provided passcode."); + } + + // External PASE verifier takes precedence when present (even though it is identical to passcode-based + // one when the latter is present). + if (havePaseVerifier) { + mSerializedPaseVerifier = std::move(serializedSpake2pVerifier); + } else { + mSerializedPaseVerifier = std::move(serializedPasscodeVerifier); + } + mDiscriminator = discriminator; + mPaseSalt = std::move(spake2pSalt); + mPaseIterationCount = spake2pIterationCount; + if (havePasscode) { + mSetupPasscode.SetValue(setupPasscode); + } + + // Set to global CommissionableDataProvider once success first time + if (!mFirstUpdated) { + DeviceLayer::SetCommissionableDataProvider(this); + } + mFirstUpdated = true; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommissionableDataProviderImpl::GetSetupDiscriminator(uint16_t & setupDiscriminator) +{ + VerifyOrReturnError(mFirstUpdated, CHIP_ERROR_INCORRECT_STATE); + setupDiscriminator = mDiscriminator; + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommissionableDataProviderImpl::GetSpake2pIterationCount(uint32_t & iterationCount) +{ + ChipLogProgress(AppServer, "CommissionableDataProviderImpl::GetSpake2pIterationCount called"); + VerifyOrReturnLogError(mFirstUpdated, CHIP_ERROR_INCORRECT_STATE); + iterationCount = mPaseIterationCount; + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommissionableDataProviderImpl::GetSpake2pSalt(chip::MutableByteSpan & saltBuf) +{ + ChipLogProgress(AppServer, "CommissionableDataProviderImpl::GetSpake2pSalt called"); + VerifyOrReturnError(mFirstUpdated, CHIP_ERROR_INCORRECT_STATE); + + VerifyOrReturnError(saltBuf.size() >= kSpake2p_Max_PBKDF_Salt_Length, CHIP_ERROR_BUFFER_TOO_SMALL); + memcpy(saltBuf.data(), mPaseSalt.data(), mPaseSalt.size()); + saltBuf.reduce_size(mPaseSalt.size()); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommissionableDataProviderImpl::GetSpake2pVerifier(chip::MutableByteSpan & verifierBuf, size_t & outVerifierLen) +{ + ChipLogProgress(AppServer, "CommissionableDataProviderImpl::GetSpake2pVerifier called"); + VerifyOrReturnError(mFirstUpdated, CHIP_ERROR_INCORRECT_STATE); + + // By now, serialized verifier from Init should be correct size + VerifyOrReturnError(mSerializedPaseVerifier.size() == kSpake2p_VerifierSerialized_Length, CHIP_ERROR_INTERNAL); + + outVerifierLen = mSerializedPaseVerifier.size(); + VerifyOrReturnError(verifierBuf.size() >= outVerifierLen, CHIP_ERROR_BUFFER_TOO_SMALL); + memcpy(verifierBuf.data(), mSerializedPaseVerifier.data(), mSerializedPaseVerifier.size()); + verifierBuf.reduce_size(mSerializedPaseVerifier.size()); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommissionableDataProviderImpl::GetSetupPasscode(uint32_t & setupPasscode) +{ + ChipLogProgress(AppServer, "CommissionableDataProviderImpl::GetSetupPasscode called"); + VerifyOrReturnError(mFirstUpdated, CHIP_ERROR_INCORRECT_STATE); + + // Pretend not implemented if we don't have a passcode value externally set + if (!mSetupPasscode.HasValue()) { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + + setupPasscode = mSetupPasscode.Value(); + ChipLogProgress(AppServer, "CommissionableDataProviderImpl::GetSetupPasscode returning value %d", setupPasscode); + return CHIP_NO_ERROR; +} diff --git a/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift b/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift index daef2e730d5e3a..322f1a1108d15b 100644 --- a/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift +++ b/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift @@ -22,6 +22,8 @@ import os.log struct TvCastingApp: App { let Log = Logger(subsystem: "com.matter.casting", category: "TvCastingApp") + @State + var firstAppActivation: Bool = true var body: some Scene { WindowGroup { @@ -49,6 +51,36 @@ struct TvCastingApp: App { }) } }) + .onReceive(NotificationCenter.default.publisher(for: UIApplication.willResignActiveNotification)) { _ in + self.Log.info("TvCastingApp: UIApplication.willResignActiveNotification") + if let castingServerBridge = CastingServerBridge.getSharedInstance() + { + castingServerBridge.stopMatterServer() + } + } + .onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in + self.Log.info("TvCastingApp: UIApplication.didBecomeActiveNotification") + if(!firstAppActivation) + { + if let castingServerBridge = CastingServerBridge.getSharedInstance() + { + castingServerBridge.startMatterServer() + } + } + firstAppActivation = false + } + .onReceive(NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification)) { _ in + self.Log.info("TvCastingApp: UIApplication.didEnterBackgroundNotification") + } + .onReceive(NotificationCenter.default.publisher(for: UIApplication.didFinishLaunchingNotification)) { _ in + self.Log.info("TvCastingApp: UIApplication.didFinishLaunchingNotification") + } + .onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in + self.Log.info("TvCastingApp: UIApplication.willEnterForegroundNotification") + } + .onReceive(NotificationCenter.default.publisher(for: UIApplication.willTerminateNotification)) { _ in + self.Log.info("TvCastingApp: UIApplication.willTerminateNotification") + } } } } diff --git a/examples/tv-casting-app/darwin/args.gni b/examples/tv-casting-app/darwin/args.gni index 1171f4d8398a89..64353389c5285f 100644 --- a/examples/tv-casting-app/darwin/args.gni +++ b/examples/tv-casting-app/darwin/args.gni @@ -29,3 +29,5 @@ chip_build_libshell = true chip_enable_additional_data_advertising = true chip_enable_rotating_device_id = true + +chip_config_network_layer_ble = false diff --git a/examples/tv-casting-app/tv-casting-common/BUILD.gn b/examples/tv-casting-app/tv-casting-common/BUILD.gn index 37572da1d394e4..4d797a9c5b02cf 100644 --- a/examples/tv-casting-app/tv-casting-common/BUILD.gn +++ b/examples/tv-casting-app/tv-casting-common/BUILD.gn @@ -43,6 +43,7 @@ chip_data_model("tv-casting-common") { "${chip_root}/examples/chip-tool/commands/common/Commands.cpp", "${chip_root}/examples/chip-tool/commands/common/Commands.h", "${chip_root}/examples/chip-tool/commands/common/CredentialIssuerCommands.h", + "${chip_root}/examples/chip-tool/commands/common/HexConversion.h", "${chip_root}/src/controller/ExamplePersistentStorage.cpp", "${chip_root}/src/controller/ExamplePersistentStorage.h", "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp", diff --git a/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h b/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h index b8daebc0a86f5e..e11b96824bcd5a 100644 --- a/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h +++ b/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h @@ -47,6 +47,10 @@ #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_NAME 1 +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 + +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 + #define CHIP_DEVICE_CONFIG_DEVICE_NAME "Test TV casting app" #define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART 0 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 90e17e0de986d1..ea6c92a294542b 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 @@ -51,12 +51,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -64,22 +64,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -90,7 +90,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -519,7 +519,7 @@ server cluster BinaryInputBasic = 15 { client cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -533,7 +533,7 @@ client cluster Descriptor = 29 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -560,19 +560,13 @@ server cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -580,9 +574,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -594,7 +594,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -603,7 +603,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -611,12 +611,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -695,8 +695,8 @@ server cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 8f2177004bedff..578b658092fabc 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -63,12 +63,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -76,22 +76,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -102,7 +102,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -226,7 +226,7 @@ server cluster Scenes = 5 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -242,19 +242,13 @@ server cluster Descriptor = 29 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -262,9 +256,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -276,7 +276,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -285,7 +285,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -293,12 +293,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -381,8 +381,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -474,22 +474,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -1637,7 +1637,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 705e782125e759..0e0e1180486cf1 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -1737,7 +1737,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1773,7 +1773,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/examples/window-app/nrfconnect/prj.conf b/examples/window-app/nrfconnect/prj.conf index a284009a305d99..3dc711bce86098 100644 --- a/examples/window-app/nrfconnect/prj.conf +++ b/examples/window-app/nrfconnect/prj.conf @@ -46,3 +46,6 @@ CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024 CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n + +# Reduce application size +CONFIG_USE_SEGGER_RTT=n diff --git a/examples/window-app/nrfconnect/prj_no_dfu.conf b/examples/window-app/nrfconnect/prj_no_dfu.conf index 3f55608bc1357e..d2da9b1a184eaa 100644 --- a/examples/window-app/nrfconnect/prj_no_dfu.conf +++ b/examples/window-app/nrfconnect/prj_no_dfu.conf @@ -52,6 +52,9 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n +# Reduce application size +CONFIG_USE_SEGGER_RTT=n + # Disable Matter OTA DFU CONFIG_CHIP_OTA_REQUESTOR=n diff --git a/examples/window-app/nrfconnect/prj_release.conf b/examples/window-app/nrfconnect/prj_release.conf index c801e2f86bb9a7..336eb9ea95169f 100644 --- a/examples/window-app/nrfconnect/prj_release.conf +++ b/examples/window-app/nrfconnect/prj_release.conf @@ -54,6 +54,7 @@ CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024 CONFIG_PM_DEVICE=y # Disable all debug features +CONFIG_USE_SEGGER_RTT=n CONFIG_SHELL=n CONFIG_OPENTHREAD_SHELL=n CONFIG_CONSOLE=n diff --git a/examples/window-app/silabs/efr32/BUILD.gn b/examples/window-app/silabs/efr32/BUILD.gn index 930d7254239415..7b832a852375df 100644 --- a/examples/window-app/silabs/efr32/BUILD.gn +++ b/examples/window-app/silabs/efr32/BUILD.gn @@ -94,11 +94,6 @@ defines = [] # WiFi settings if (chip_enable_wifi) { - # disabling LCD for MG24 for wifi - if (silabs_board == "BRD4186C" || silabs_board == "BRD4187C") { - show_qr_code = false - disable_lcd = true - } if (chip_default_wifi_ssid != "") { defines += [ "CHIP_ONNETWORK_PAIRING=1", diff --git a/scripts/idl/README.md b/scripts/idl/README.md index 78ee9325ddf2e4..ac3ddf517f8277 100644 --- a/scripts/idl/README.md +++ b/scripts/idl/README.md @@ -60,7 +60,7 @@ server cluster AccessControl = 31 { // request structures are regular structures that are used // as command inputs. Special tagging to make the use clear. - request struct AnnounceOtaProviderRequest {} + request struct AnnounceOTAProviderRequest {} request struct ConnectNetworkRequest { OCTET_STRING networkID = 0; INT64U breadcrumb = 1; @@ -109,7 +109,7 @@ server cluster AccessControl = 31 { // IDLs specifically do not define a structure for DefaultSuccess. // // which is considered an internal type. - command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 1; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 1; // Some commands may take no inputs at all command On(): DefaultSuccess = 2; diff --git a/scripts/idl/tests/inputs/large_all_clusters_app.matter b/scripts/idl/tests/inputs/large_all_clusters_app.matter index 47810281dfd37f..32eac2423ee3da 100644 --- a/scripts/idl/tests/inputs/large_all_clusters_app.matter +++ b/scripts/idl/tests/inputs/large_all_clusters_app.matter @@ -720,7 +720,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { + request struct AnnounceOTAProviderRequest { node_id providerNodeId = 0; vendor_id vendorId = 1; OTAAnnouncementReason announcementReason = 2; @@ -728,7 +728,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } - command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; + command AnnounceOTAProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { diff --git a/scripts/idl/tests/inputs/large_lighting_app.matter b/scripts/idl/tests/inputs/large_lighting_app.matter index 67b2390fe614b7..5ebc3616898784 100644 --- a/scripts/idl/tests/inputs/large_lighting_app.matter +++ b/scripts/idl/tests/inputs/large_lighting_app.matter @@ -515,7 +515,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { + request struct AnnounceOTAProviderRequest { node_id providerNodeId = 0; vendor_id vendorId = 1; OTAAnnouncementReason announcementReason = 2; @@ -523,7 +523,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } - command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; + command AnnounceOTAProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { diff --git a/scripts/tests/yamltests/fixes.py b/scripts/tests/yamltests/fixes.py index a0126b003f9a2e..676739d5ae3f6b 100644 --- a/scripts/tests/yamltests/fixes.py +++ b/scripts/tests/yamltests/fixes.py @@ -54,8 +54,6 @@ def try_apply_yaml_float_written_as_strings(value): return value -# TODO(thampson) This method is a clone of the method in -# src/controller/python/chip/yaml/format_converter.py and should eventually be removed in that file. def convert_yaml_octet_string_to_bytes(s: str) -> bytes: '''Convert YAML octet string body to bytes. diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index 9ea30029c9e30a..47b7a6168e4d74 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -82,7 +82,7 @@ class AccessControlAttribute : public AttributeAccessInterface, public EntryList CHIP_ERROR WriteExtension(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder); } sAttribute; -CHIP_ERROR LogExtensionChangedEvent(const AccessControlCluster::Structs::ExtensionEntry::Type & item, +CHIP_ERROR LogExtensionChangedEvent(const AccessControlCluster::Structs::AccessControlExtensionStruct::Type & item, const Access::SubjectDescriptor & subjectDescriptor, AccessControlCluster::ChangeTypeEnum changeType) { @@ -207,7 +207,7 @@ CHIP_ERROR AccessControlAttribute::ReadExtension(AttributeValueEncoder & aEncode continue; } ReturnErrorOnFailure(errStorage); - AccessControlCluster::Structs::ExtensionEntry::Type item = { + AccessControlCluster::Structs::AccessControlExtensionStruct::Type item = { .data = ByteSpan(buffer, size), .fabricIndex = fabric.GetFabricIndex(), }; @@ -306,7 +306,7 @@ CHIP_ERROR AccessControlAttribute::WriteExtension(const ConcreteDataAttributePat if (!aPath.IsListItemOperation()) { - DataModel::DecodableList list; + DataModel::DecodableList list; ReturnErrorOnFailure(aDecoder.Decode(list)); size_t count = 0; @@ -317,7 +317,7 @@ CHIP_ERROR AccessControlAttribute::WriteExtension(const ConcreteDataAttributePat ReturnErrorCodeIf(errStorage == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_NO_ERROR); ReturnErrorOnFailure(storage.SyncDeleteKeyValue( DefaultStorageKeyAllocator::AccessControlExtensionEntry(accessingFabricIndex).KeyName())); - AccessControlCluster::Structs::ExtensionEntry::Type item = { + AccessControlCluster::Structs::AccessControlExtensionStruct::Type item = { .data = ByteSpan(buffer, size), .fabricIndex = accessingFabricIndex, }; @@ -355,7 +355,7 @@ CHIP_ERROR AccessControlAttribute::WriteExtension(const ConcreteDataAttributePat else if (aPath.mListOp == ConcreteDataAttributePath::ListOperation::AppendItem) { ReturnErrorCodeIf(errStorage != CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_IM_GLOBAL_STATUS(ConstraintError)); - AccessControlCluster::Structs::ExtensionEntry::DecodableType item; + AccessControlCluster::Structs::AccessControlExtensionStruct::DecodableType item; ReturnErrorOnFailure(aDecoder.Decode(item)); // TODO(#13590): generated code doesn't automatically handle max length so do it manually ReturnErrorCodeIf(item.data.size() > kExtensionDataMaxLength, CHIP_IM_GLOBAL_STATUS(ConstraintError)); diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index e14ea6daf40462..fbd6574f06a59e 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -120,8 +120,8 @@ CHIP_ERROR DescriptorAttrAccess::ReadDeviceAttribute(EndpointId endpoint, Attrib for (auto & deviceType : deviceTypeList) { - deviceStruct.type = deviceType.deviceId; - deviceStruct.revision = deviceType.deviceVersion; + deviceStruct.deviceType = deviceType.deviceId; + deviceStruct.revision = deviceType.deviceVersion; ReturnErrorOnFailure(encoder.Encode(deviceStruct)); } diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp index 588220e0dc371f..815687605193f4 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -143,8 +143,8 @@ bool emberAfGroupsClusterAddGroupCallback(app::CommandHandler * commandObj, cons auto fabricIndex = commandObj->GetAccessingFabricIndex(); Groups::Commands::AddGroupResponse::Type response; - response.groupId = commandData.groupId; - response.status = GroupAdd(fabricIndex, commandPath.mEndpointId, commandData.groupId, commandData.groupName); + response.groupID = commandData.groupID; + response.status = GroupAdd(fabricIndex, commandPath.mEndpointId, commandData.groupID, commandData.groupName); commandObj->AddResponse(commandPath, response); return true; } @@ -153,7 +153,7 @@ bool emberAfGroupsClusterViewGroupCallback(app::CommandHandler * commandObj, con const Commands::ViewGroup::DecodableType & commandData) { auto fabricIndex = commandObj->GetAccessingFabricIndex(); - auto groupId = commandData.groupId; + auto groupId = commandData.groupID; GroupDataProvider * provider = GetGroupDataProvider(); GroupDataProvider::GroupInfo info; Groups::Commands::ViewGroupResponse::Type response; @@ -170,7 +170,7 @@ bool emberAfGroupsClusterViewGroupCallback(app::CommandHandler * commandObj, con response.groupName = CharSpan(info.name, strnlen(info.name, GroupDataProvider::GroupInfo::kGroupNameMax)); status = EMBER_ZCL_STATUS_SUCCESS; exit: - response.groupId = groupId; + response.groupID = groupId; response.status = status; commandObj->AddResponse(commandPath, response); return true; @@ -289,10 +289,10 @@ bool emberAfGroupsClusterRemoveGroupCallback(app::CommandHandler * commandObj, c #ifdef EMBER_AF_PLUGIN_SCENES // If a group is, removed the scenes associated with that group SHOULD be removed. - emberAfScenesClusterRemoveScenesInGroupCallback(commandPath.mEndpointId, commandData.groupId); + emberAfScenesClusterRemoveScenesInGroupCallback(commandPath.mEndpointId, commandData.groupID); #endif - response.groupId = commandData.groupId; - response.status = GroupRemove(fabricIndex, commandPath.mEndpointId, commandData.groupId); + response.groupID = commandData.groupID; + response.status = GroupRemove(fabricIndex, commandPath.mEndpointId, commandData.groupID); commandObj->AddResponse(commandPath, response); return true; @@ -342,7 +342,7 @@ bool emberAfGroupsClusterAddGroupIfIdentifyingCallback(app::CommandHandler * com const Commands::AddGroupIfIdentifying::DecodableType & commandData) { auto fabricIndex = commandObj->GetAccessingFabricIndex(); - auto groupId = commandData.groupId; + auto groupId = commandData.groupID; auto groupName = commandData.groupName; auto endpointId = commandPath.mEndpointId; diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index 260051d636a78c..4fa560a30b902d 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -351,7 +351,7 @@ bool OnOffServer::toggleCommand(const app::ConcreteCommandPath & commandPath) bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::OffWithEffect::DecodableType & commandData) { - OnOffEffectIdentifier effectId = commandData.effectId; + OnOffEffectIdentifier effectId = commandData.effectIdentifier; uint8_t effectVariant = commandData.effectVariant; chip::EndpointId endpoint = commandPath.mEndpointId; EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; diff --git a/src/app/clusters/ota-provider/ota-provider.cpp b/src/app/clusters/ota-provider/ota-provider.cpp index da21de71399c92..c55641b7b4cbd8 100644 --- a/src/app/clusters/ota-provider/ota-provider.cpp +++ b/src/app/clusters/ota-provider/ota-provider.cpp @@ -148,8 +148,8 @@ bool emberAfOtaSoftwareUpdateProviderClusterQueryImageCallback(app::CommandHandl const app::ConcreteCommandPath & commandPath, const Commands::QueryImage::DecodableType & commandData) { - auto & vendorId = commandData.vendorId; - auto & productId = commandData.productId; + auto & vendorId = commandData.vendorID; + auto & productId = commandData.productID; auto & hardwareVersion = commandData.hardwareVersion; auto & softwareVersion = commandData.softwareVersion; auto & protocolsSupported = commandData.protocolsSupported; diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp index e339659b716019..a8e29660aedc80 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp @@ -327,7 +327,7 @@ void DefaultOTARequestor::Reset() } void DefaultOTARequestor::HandleAnnounceOTAProvider(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, - const AnnounceOtaProvider::DecodableType & commandData) + const AnnounceOTAProvider::DecodableType & commandData) { VerifyOrReturn(commandObj != nullptr, ChipLogError(SoftwareUpdate, "Invalid commandObj, cannot handle AnnounceOTAProvider")); @@ -335,13 +335,13 @@ void DefaultOTARequestor::HandleAnnounceOTAProvider(app::CommandHandler * comman ChipLogProgress(SoftwareUpdate, "OTA Requestor received AnnounceOTAProvider"); - ProviderLocationType providerLocation = { .providerNodeID = commandData.providerNodeId, + ProviderLocationType providerLocation = { .providerNodeID = commandData.providerNodeID, .endpoint = commandData.endpoint, .fabricIndex = commandObj->GetAccessingFabricIndex() }; ChipLogDetail(SoftwareUpdate, " FabricIndex: %u", providerLocation.fabricIndex); ChipLogDetail(SoftwareUpdate, " ProviderNodeID: 0x" ChipLogFormatX64, ChipLogValueX64(providerLocation.providerNodeID)); - ChipLogDetail(SoftwareUpdate, " VendorID: 0x%x", commandData.vendorId); + ChipLogDetail(SoftwareUpdate, " VendorID: 0x%x", commandData.vendorID); ChipLogDetail(SoftwareUpdate, " AnnouncementReason: %u", to_underlying(announcementReason)); if (commandData.metadataForNode.HasValue()) { @@ -737,9 +737,9 @@ CHIP_ERROR DefaultOTARequestor::SendQueryImageRequest(Messaging::ExchangeManager uint16_t vendorId; ReturnErrorOnFailure(DeviceLayer::GetDeviceInstanceInfoProvider()->GetVendorId(vendorId)); - args.vendorId = static_cast(vendorId); + args.vendorID = static_cast(vendorId); - ReturnErrorOnFailure(DeviceLayer::GetDeviceInstanceInfoProvider()->GetProductId(args.productId)); + ReturnErrorOnFailure(DeviceLayer::GetDeviceInstanceInfoProvider()->GetProductId(args.productID)); ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetSoftwareVersion(args.softwareVersion)); diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.h b/src/app/clusters/ota-requestor/DefaultOTARequestor.h index 938f2be59f671a..32de9772743491 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.h +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.h @@ -44,7 +44,7 @@ class DefaultOTARequestor : public OTARequestorInterface, public BDXDownloader:: void HandleAnnounceOTAProvider( app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, - const app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData) override; + const app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::DecodableType & commandData) override; // Application API to send the QueryImage command and start the image update process with the next available Provider CHIP_ERROR TriggerImmediateQuery(FabricIndex fabricIndex) override; diff --git a/src/app/clusters/ota-requestor/OTARequestorInterface.h b/src/app/clusters/ota-requestor/OTARequestorInterface.h index bd09f833971cc0..d81b67424f0b60 100644 --- a/src/app/clusters/ota-requestor/OTARequestorInterface.h +++ b/src/app/clusters/ota-requestor/OTARequestorInterface.h @@ -154,7 +154,7 @@ class OTARequestorInterface */ virtual void HandleAnnounceOTAProvider( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData) = 0; + const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::DecodableType & commandData) = 0; // Destructor virtual ~OTARequestorInterface() = default; diff --git a/src/app/clusters/ota-requestor/ota-requestor-server.cpp b/src/app/clusters/ota-requestor/ota-requestor-server.cpp index 06adf80e4de07f..b5611b7d57c70f 100644 --- a/src/app/clusters/ota-requestor/ota-requestor-server.cpp +++ b/src/app/clusters/ota-requestor/ota-requestor-server.cpp @@ -62,7 +62,7 @@ CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::Read(const ConcreteReadAttribut { switch (aPath.mAttributeId) { - case Attributes::DefaultOtaProviders::Id: + case Attributes::DefaultOTAProviders::Id: return ReadDefaultOtaProviders(aEncoder); default: break; @@ -75,7 +75,7 @@ CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::Write(const ConcreteDataAttribu { switch (aPath.mAttributeId) { - case Attributes::DefaultOtaProviders::Id: { + case Attributes::DefaultOTAProviders::Id: { return WriteDefaultOtaProviders(aPath, aDecoder); } default: @@ -258,9 +258,9 @@ void OtaRequestorServerOnDownloadError(uint32_t softwareVersion, uint64_t bytesD // ----------------------------------------------------------------------------- // Callbacks implementation -bool emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback( +bool emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData) + const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::DecodableType & commandData) { auto & metadataForNode = commandData.metadataForNode; diff --git a/src/app/server/AclStorage.cpp b/src/app/server/AclStorage.cpp index 9fdb412ed523ec..62b90ebab3e98c 100644 --- a/src/app/server/AclStorage.cpp +++ b/src/app/server/AclStorage.cpp @@ -25,8 +25,8 @@ using namespace chip::Access; using Entry = AccessControl::Entry; using EntryListener = AccessControl::EntryListener; -using StagingAuthMode = Clusters::AccessControl::AuthMode; -using StagingPrivilege = Clusters::AccessControl::Privilege; +using StagingAuthMode = Clusters::AccessControl::AccessControlEntryAuthModeEnum; +using StagingPrivilege = Clusters::AccessControl::AccessControlEntryPrivilegeEnum; using StagingTarget = Clusters::AccessControl::Structs::Target::Type; using Target = AccessControl::Entry::Target; diff --git a/src/app/server/AclStorage.h b/src/app/server/AclStorage.h index 72e9dd4706ac76..bb12737328375e 100644 --- a/src/app/server/AclStorage.h +++ b/src/app/server/AclStorage.h @@ -53,7 +53,7 @@ class AclStorage class DecodableEntry { using Entry = Access::AccessControl::Entry; - using StagingEntry = Clusters::AccessControl::Structs::AccessControlEntry::DecodableType; + using StagingEntry = Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType; public: DecodableEntry() = default; @@ -93,7 +93,7 @@ class AclStorage class EncodableEntry { using Entry = Access::AccessControl::Entry; - using StagingEntry = Clusters::AccessControl::Structs::AccessControlEntry::Type; + using StagingEntry = Clusters::AccessControl::Structs::AccessControlEntryStruct::Type; using StagingTarget = Clusters::AccessControl::Structs::Target::Type; public: diff --git a/src/app/server/DefaultAclStorage.cpp b/src/app/server/DefaultAclStorage.cpp index 61a06000412e7e..d36aaca31b8c3d 100644 --- a/src/app/server/DefaultAclStorage.cpp +++ b/src/app/server/DefaultAclStorage.cpp @@ -26,8 +26,8 @@ using namespace chip::Access; using EncodableEntry = AclStorage::EncodableEntry; using Entry = AccessControl::Entry; using EntryListener = AccessControl::EntryListener; -using StagingAuthMode = Clusters::AccessControl::AuthMode; -using StagingPrivilege = Clusters::AccessControl::Privilege; +using StagingAuthMode = Clusters::AccessControl::AccessControlEntryAuthModeEnum; +using StagingPrivilege = Clusters::AccessControl::AccessControlEntryPrivilegeEnum; using StagingTarget = Clusters::AccessControl::Structs::Target::Type; using Target = AccessControl::Entry::Target; diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index d11f29a66c72c2..6afc8f8e2615fc 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -54,6 +54,18 @@ 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("ota-requestor-test-srcs") { sources = [ "${chip_root}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp", @@ -77,6 +89,7 @@ chip_test_suite("tests") { "TestAttributeValueEncoder.cpp", "TestBindingTable.cpp", "TestBuilderParser.cpp", + "TestClientMonitoringRegistrationTable.cpp", "TestClusterInfo.cpp", "TestCommandInteraction.cpp", "TestCommandPathParams.cpp", @@ -117,6 +130,7 @@ chip_test_suite("tests") { public_deps = [ ":binding-test-srcs", + ":client-monitoring-test-srcs", ":ota-requestor-test-srcs", "${chip_root}/src/app", "${chip_root}/src/app/common:cluster-objects", diff --git a/src/app/tests/TestAttributeValueDecoder.cpp b/src/app/tests/TestAttributeValueDecoder.cpp index 04f65d0171bc63..0f01d506752ba6 100644 --- a/src/app/tests/TestAttributeValueDecoder.cpp +++ b/src/app/tests/TestAttributeValueDecoder.cpp @@ -66,8 +66,8 @@ void TestOverwriteFabricIndexInStruct(nlTestSuite * aSuite, void * aContext) { TestSetup setup; CHIP_ERROR err; - Clusters::AccessControl::Structs::ExtensionEntry::Type item; - Clusters::AccessControl::Structs::ExtensionEntry::DecodableType decodeItem; + Clusters::AccessControl::Structs::AccessControlExtensionStruct::Type item; + Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType decodeItem; Access::SubjectDescriptor subjectDescriptor = { .fabricIndex = kTestFabricIndex }; item.fabricIndex = 0; @@ -99,7 +99,7 @@ void TestOverwriteFabricIndexInListOfStructs(nlTestSuite * aSuite, void * aConte { TestSetup setup; CHIP_ERROR err; - Clusters::AccessControl::Structs::ExtensionEntry::Type items[kTestListElements]; + Clusters::AccessControl::Structs::AccessControlExtensionStruct::Type items[kTestListElements]; Clusters::AccessControl::Attributes::Extension::TypeInfo::DecodableType decodeItems; Access::SubjectDescriptor subjectDescriptor = { .fabricIndex = kTestFabricIndex }; @@ -108,7 +108,7 @@ void TestOverwriteFabricIndexInListOfStructs(nlTestSuite * aSuite, void * aConte items[i].fabricIndex = i; } - err = setup.Encode(DataModel::List(items)); + err = setup.Encode(DataModel::List(items)); NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); TLV::TLVReader reader; diff --git a/src/app/tests/TestAttributeValueEncoder.cpp b/src/app/tests/TestAttributeValueEncoder.cpp index a75c692428f963..8c044929ad21d6 100644 --- a/src/app/tests/TestAttributeValueEncoder.cpp +++ b/src/app/tests/TestAttributeValueEncoder.cpp @@ -254,7 +254,7 @@ void TestEncodeEmptyList2(nlTestSuite * aSuite, void * aContext) void TestEncodeFabricScoped(nlTestSuite * aSuite, void * aContext) { TestSetup test(aSuite, kTestFabricIndex); - Clusters::AccessControl::Structs::ExtensionEntry::Type items[3]; + Clusters::AccessControl::Structs::AccessControlExtensionStruct::Type items[3]; items[0].fabricIndex = 1; items[1].fabricIndex = 2; items[2].fabricIndex = 3; diff --git a/src/app/tests/TestClientMonitoringRegistrationTable.cpp b/src/app/tests/TestClientMonitoringRegistrationTable.cpp new file mode 100644 index 00000000000000..a05d9e6d490615 --- /dev/null +++ b/src/app/tests/TestClientMonitoringRegistrationTable.cpp @@ -0,0 +1,141 @@ +/* + * + * 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); +} + +} // 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_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/suites/OTA_SuccessfulTransfer.yaml b/src/app/tests/suites/OTA_SuccessfulTransfer.yaml index 4e186d4fd5b815..ed31f4b232c93d 100644 --- a/src/app/tests/suites/OTA_SuccessfulTransfer.yaml +++ b/src/app/tests/suites/OTA_SuccessfulTransfer.yaml @@ -144,7 +144,7 @@ tests: - label: "Send an announce OTA provider command to the requestor" cluster: "OTA Software Update Requestor" - command: "AnnounceOtaProvider" + command: "AnnounceOTAProvider" arguments: values: - name: "providerNodeId" diff --git a/src/app/tests/suites/TestArmFailSafe.yaml b/src/app/tests/suites/TestArmFailSafe.yaml index 599164d74ecd0f..4ab62383d6b6d3 100644 --- a/src/app/tests/suites/TestArmFailSafe.yaml +++ b/src/app/tests/suites/TestArmFailSafe.yaml @@ -45,13 +45,13 @@ tests: command: "ArmFailSafe" arguments: values: - - name: "expiryLengthSeconds" + - name: "ExpiryLengthSeconds" value: 0 - - name: "breadcrumb" + - name: "Breadcrumb" value: 0 response: values: - - name: "errorCode" + - name: "ErrorCode" value: 0 - label: "Reads NodeLabel mandatory attribute of target device" diff --git a/src/app/tests/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index d49accc2f68cba..4b146ba502db3b 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -32,7 +32,7 @@ tests: command: "readAttribute" attribute: "DeviceTypeList" response: - value: [{ type: 22, revision: 1 }] + value: [{ DeviceType: 22, Revision: 1 }] - label: "Read attribute Server list" command: "readAttribute" diff --git a/src/app/tests/suites/TestGeneralCommissioning.yaml b/src/app/tests/suites/TestGeneralCommissioning.yaml index dbd7072d3e8b39..b42e6cb263e98e 100644 --- a/src/app/tests/suites/TestGeneralCommissioning.yaml +++ b/src/app/tests/suites/TestGeneralCommissioning.yaml @@ -92,7 +92,7 @@ tests: command: "CommissioningComplete" response: values: - - name: errorCode + - name: ErrorCode value: 3 # NoFailSafe - label: "Check Breadcrumb was not touched by invalid CommissioningComplete" @@ -115,13 +115,13 @@ tests: command: "ArmFailSafe" arguments: values: - - name: expiryLengthSeconds + - name: ExpiryLengthSeconds value: 10 - - name: breadcrumb + - name: Breadcrumb value: 5000 response: values: - - name: errorCode + - name: ErrorCode value: 4 # BusyWithOtherAdmin - label: @@ -162,13 +162,13 @@ tests: command: "ArmFailSafe" arguments: values: - - name: expiryLengthSeconds + - name: ExpiryLengthSeconds value: 500 - - name: breadcrumb + - name: Breadcrumb value: 2 response: values: - - name: errorCode + - name: ErrorCode value: 0 # OK - label: "Check Breadcrumb was properly set by ArmFailSafe" @@ -182,13 +182,13 @@ tests: identity: "beta" arguments: values: - - name: expiryLengthSeconds + - name: ExpiryLengthSeconds value: 10 - - name: breadcrumb + - name: Breadcrumb value: 5000 response: values: - - name: errorCode + - name: ErrorCode value: 4 # BusyWithOtherAdmin - label: @@ -204,7 +204,7 @@ tests: identity: "beta" response: values: - - name: errorCode + - name: ErrorCode value: 2 # InvalidAuthentication - label: @@ -219,7 +219,7 @@ tests: command: "CommissioningComplete" response: values: - - name: errorCode + - name: ErrorCode value: 0 # Ok - label: "Check Breadcrumb was reset to 0 by CommissioningComplete" @@ -232,13 +232,13 @@ tests: command: "ArmFailSafe" arguments: values: - - name: expiryLengthSeconds + - name: ExpiryLengthSeconds value: 500 - - name: breadcrumb + - name: Breadcrumb value: 3 response: values: - - name: errorCode + - name: ErrorCode value: 0 # OK - label: "Check Breadcrumb was set by arming fail-safe again" @@ -251,13 +251,13 @@ tests: command: "ArmFailSafe" arguments: values: - - name: expiryLengthSeconds + - name: ExpiryLengthSeconds value: 0 - - name: breadcrumb + - name: Breadcrumb value: 4 response: values: - - name: errorCode + - name: ErrorCode value: 0 # OK - label: "Check Breadcrumb was reset by expiring the fail-safe" diff --git a/src/app/tests/suites/TestGroupDemoConfig.yaml b/src/app/tests/suites/TestGroupDemoConfig.yaml index 97277f16be6526..284eb1686d953b 100644 --- a/src/app/tests/suites/TestGroupDemoConfig.yaml +++ b/src/app/tests/suites/TestGroupDemoConfig.yaml @@ -71,15 +71,15 @@ tests: endpoint: 1 arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0101 - - name: "groupName" + - name: "GroupName" value: "Group #1" response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0101 - label: "Install ACLs" diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index d7e9d95b24cf0a..f388434370cb6a 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -155,15 +155,15 @@ tests: command: "AddGroup" arguments: values: - - name: "GroupId" + - name: "GroupID" value: 0x0101 - name: "GroupName" value: "Group #1" response: values: - - name: "status" + - name: "Status" value: 0 - - name: "GroupId" + - name: "GroupID" value: 0x0101 - label: "Add Group 2" @@ -172,15 +172,15 @@ tests: command: "AddGroup" arguments: values: - - name: "GroupId" + - name: "GroupID" value: 0x0102 - name: "GroupName" value: "Group #2" response: values: - - name: "status" + - name: "Status" value: 0 - - name: "GroupId" + - name: "GroupID" value: 0x0102 - label: "Read GroupTable" @@ -246,13 +246,13 @@ tests: command: "RemoveGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0101 response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0101 - label: "Read GroupTable 2" diff --git a/src/app/tests/suites/TestGroupMessaging.yaml b/src/app/tests/suites/TestGroupMessaging.yaml index 1cd3fc9ba2ef31..f13d2d0f65f706 100644 --- a/src/app/tests/suites/TestGroupMessaging.yaml +++ b/src/app/tests/suites/TestGroupMessaging.yaml @@ -94,15 +94,15 @@ tests: endpoint: 1 arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0101 - - name: "groupName" + - name: "GroupName" value: "Group #1" response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0101 - label: "Add Group 2 (endpoint 0)" @@ -111,15 +111,15 @@ tests: endpoint: 0 arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0102 - - name: "groupName" + - name: "GroupName" value: "Group #2" response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0102 - label: "Install ACLs" @@ -347,15 +347,15 @@ tests: endpoint: 1 arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0101 - - name: "groupName" + - name: "GroupName" value: "Group #1" response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0101 - label: "Add Group 2 (endpoint 0) for gamma" @@ -365,15 +365,15 @@ tests: endpoint: 0 arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0102 - - name: "groupName" + - name: "GroupName" value: "Group #2" response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0102 - label: "Install ACLs for gamma" diff --git a/src/app/tests/suites/TestGroupsCluster.yaml b/src/app/tests/suites/TestGroupsCluster.yaml index 326dcbbdf1cc3c..f584899e9334ec 100644 --- a/src/app/tests/suites/TestGroupsCluster.yaml +++ b/src/app/tests/suites/TestGroupsCluster.yaml @@ -32,41 +32,41 @@ tests: command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0 response: values: - - name: "status" + - name: "Status" value: 0x87 - - name: "groupId" + - name: "GroupID" value: 0 - label: "View First Group (not found)" command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0101 response: values: - - name: "status" + - name: "Status" value: 0x8B - - name: "groupId" + - name: "GroupID" value: 0x0101 - label: "Add First Group (no keys)" command: "AddGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0101 - - name: "groupName" + - name: "GroupName" value: "Group #1" response: values: - - name: "status" + - name: "Status" value: 0x7e - - name: "groupId" + - name: "GroupId" value: 0x0101 - label: "Add KeySet" @@ -104,99 +104,99 @@ tests: command: "AddGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0101 - - name: "groupName" + - name: "GroupName" value: "Group #1" response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0101 - label: "View First Group (new)" command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0101 response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0101 - - name: "groupName" + - name: "GroupName" value: "Group #1" - label: "View Second Group (not found)" command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0102 response: values: - - name: "status" + - name: "Status" value: 0x8B - - name: "groupId" + - name: "GroupID" value: 0x0102 - label: "Get Group Membership 1 (all)" command: "GetGroupMembership" arguments: values: - - name: "groupList" + - name: "GroupList" value: [] response: values: - - name: "capacity" + - name: "Capacity" value: null - - name: "groupList" + - name: "GroupList" value: [0x0101] - label: "Add Second Group (new)" command: "AddGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0102 - - name: "groupName" + - name: "GroupName" value: "Group #2" response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0102 - label: "View Second Group (new)" command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0102 response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0102 - - name: "groupName" + - name: "GroupName" value: "Group #2" - label: "View Group 3 (not found)" command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x7fff response: values: - - name: "status" + - name: "Status" value: 0x8B - - name: "groupId" + - name: "GroupID" value: 0x7fff - label: "Add Group 3 (new)" @@ -205,58 +205,58 @@ tests: command: "AddGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x7fff - - name: "groupName" + - name: "GroupName" value: "Group #3" response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x7fff - label: "View First Group (existing)" command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0101 response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0101 - - name: "groupName" + - name: "GroupName" value: "Group #1" - label: "View Second Group (existing)" command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0102 response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0102 - - name: "groupName" + - name: "GroupName" value: "Group #2" - label: "Get Group Membership 2" command: "GetGroupMembership" arguments: values: - - name: "groupList" + - name: "GroupList" value: [0x0102, 0x0103, 0x7fff] response: values: - - name: "capacity" + - name: "Capacity" value: null - - name: "groupList" + - name: "GroupList" value: [0x0102] - label: "View Group 3 (new)" @@ -265,82 +265,82 @@ tests: command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x7fff response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x7fff - - name: "groupName" + - name: "GroupName" value: "Group #3" - label: "Remove Group 0 (invalid)" command: "RemoveGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0 response: values: - - name: "status" + - name: "Status" value: 0x87 - - name: "groupId" + - name: "GroupID" value: 0 - label: "Remove Group 4 (not found)" command: "RemoveGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0104 response: values: - - name: "status" + - name: "Status" value: 0x8B - - name: "groupId" + - name: "GroupID" value: 0x0104 - label: "Remove Second Group (existing)" command: "RemoveGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0102 response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0102 - label: "View First Group (not removed)" command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0101 response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x0101 - - name: "groupName" + - name: "GroupName" value: "Group #1" - label: "View Second Group (removed)" command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0102 response: values: - - name: "status" + - name: "Status" value: 0x8B - - name: "groupId" + - name: "GroupID" value: 0x0102 - label: "View Group 3 (not removed)" @@ -349,28 +349,28 @@ tests: command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x7fff response: values: - - name: "status" + - name: "Status" value: 0 - - name: "groupId" + - name: "GroupID" value: 0x7fff - - name: "groupName" + - name: "GroupName" value: "Group #3" - label: "Get Group Membership 3" command: "GetGroupMembership" arguments: values: - - name: "groupList" + - name: "GroupList" value: [0x01, 0x0101, 0x0102, 0x03] response: values: - - name: "capacity" + - name: "Capacity" value: null - - name: "groupList" + - name: "GroupList" value: [0x0101] - label: "Remove All" @@ -380,50 +380,50 @@ tests: command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0101 response: values: - - name: "status" + - name: "Status" value: 0x8B - - name: "groupId" + - name: "GroupID" value: 0x0101 - label: "View Second Group (still removed)" command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x0102 response: values: - - name: "status" + - name: "Status" value: 0x8B - - name: "groupId" + - name: "GroupID" value: 0x0102 - label: "View Group 3 (removed)" command: "ViewGroup" arguments: values: - - name: "groupId" + - name: "GroupID" value: 0x7fff response: values: - - name: "status" + - name: "Status" value: 0x8B - - name: "groupId" + - name: "GroupID" value: 0x7fff - label: "Get Group Membership 4" command: "GetGroupMembership" arguments: values: - - name: "groupList" + - name: "GroupList" value: [0x01, 0x0101, 0x0102, 0x03, 0x7fff] response: values: - - name: "capacity" + - name: "Capacity" value: null - - name: "groupList" + - name: "GroupList" value: [] diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml index 07db427d472984..910874922978be 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml @@ -218,8 +218,8 @@ tests: [1657719097.788236][4548:4554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 [1657719097.788325][4548:4554] CHIP:TOO: AddGroupResponse: { - [1657719097.788366][4548:4554] CHIP:TOO: status: 0 - [1657719097.788393][4548:4554] CHIP:TOO: groupId: 1 + [1657719097.788366][4548:4554] CHIP:TOO: Status: 0 + [1657719097.788393][4548:4554] CHIP:TOO: GroupID: 1 [1657719097.788418][4548:4554] CHIP:TOO: } @@ -231,8 +231,8 @@ tests: [1657717342.599740][3368:3373] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 [1657717342.599891][3368:3373] CHIP:TOO: AddGroupResponse: { - [1657717342.599959][3368:3373] CHIP:TOO: status: 0 - [1657717342.600007][3368:3373] CHIP:TOO: groupId: 1 + [1657717342.599959][3368:3373] CHIP:TOO: Status: 0 + [1657717342.600007][3368:3373] CHIP:TOO: GroupID: 1 [1657717342.600054][3368:3373] CHIP:TOO: } [1657717342.600130][3368:3373] CHIP:DMG: ICR moving diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml index c6b9bd69fcedb0..b069dd829746c4 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml @@ -184,8 +184,8 @@ tests: [1657719097.788236][4548:4554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 [1657719097.788325][4548:4554] CHIP:TOO: AddGroupResponse: { - [1657719097.788366][4548:4554] CHIP:TOO: status: 0 - [1657719097.788393][4548:4554] CHIP:TOO: groupId: 1 + [1657719097.788366][4548:4554] CHIP:TOO: Status: 0 + [1657719097.788393][4548:4554] CHIP:TOO: GroupID: 1 [1657719097.788418][4548:4554] CHIP:TOO: } @@ -197,8 +197,8 @@ tests: [1657719097.788236][4548:4554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 [1657719097.788325][4548:4554] CHIP:TOO: AddGroupResponse: { - [1657719097.788366][4548:4554] CHIP:TOO: status: 0 - [1657719097.788393][4548:4554] CHIP:TOO: groupId: 1 + [1657719097.788366][4548:4554] CHIP:TOO: Status: 0 + [1657719097.788393][4548:4554] CHIP:TOO: GroupID: 1 [1657719097.788418][4548:4554] CHIP:TOO: } diff --git a/src/app/tests/suites/certification/Test_TC_G_2_2.yaml b/src/app/tests/suites/certification/Test_TC_G_2_2.yaml index 1ff8701e3631d2..c2022b922e4f9f 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_2.yaml @@ -186,8 +186,8 @@ tests: [1651218084.427102][2526:2531] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 [1651218084.427203][2526:2531] CHIP:TOO: AddGroupResponse: { - [1651218084.427241][2526:2531] CHIP:TOO: status: 0 - [1651218084.427264][2526:2531] CHIP:TOO: groupId: 1 + [1651218084.427241][2526:2531] CHIP:TOO: Status: 0 + [1651218084.427264][2526:2531] CHIP:TOO: GroupID: 1 [1651218084.427314][2526:2531] CHIP:TOO: } disabled: true @@ -222,8 +222,8 @@ tests: [1653484028.897698][11275:11280] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 [1653484028.897804][11275:11280] CHIP:TOO: AddGroupResponse: { - [1653484028.897851][11275:11280] CHIP:TOO: status: 0 - [1653484028.897884][11275:11280] CHIP:TOO: groupId: 2 + [1653484028.897851][11275:11280] CHIP:TOO: Status: 0 + [1653484028.897884][11275:11280] CHIP:TOO: GroupID: 2 [1653484028.897917][11275:11280] CHIP:TOO: } disabled: true @@ -265,8 +265,8 @@ tests: [1653484116.857523][11289:11294] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 [1653484116.857675][11289:11294] CHIP:TOO: AddGroupResponse: { - [1653484116.857739][11289:11294] CHIP:TOO: status: 0 - [1653484116.857787][11289:11294] CHIP:TOO: groupId: 3 + [1653484116.857739][11289:11294] CHIP:TOO: Status: 0 + [1653484116.857787][11289:11294] CHIP:TOO: GroupID: 3 [1653484116.857834][11289:11294] CHIP:TOO: } disabled: true @@ -315,8 +315,8 @@ tests: [1653484187.170553][11306:11311] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 [1653484187.170637][11306:11311] CHIP:TOO: AddGroupResponse: { - [1653484187.170677][11306:11311] CHIP:TOO: status: 137 - [1653484187.170702][11306:11311] CHIP:TOO: groupId: 4 + [1653484187.170677][11306:11311] CHIP:TOO: Status: 137 + [1653484187.170702][11306:11311] CHIP:TOO: GroupID: 4 [1653484187.170727][11306:11311] CHIP:TOO: } disabled: true @@ -365,8 +365,8 @@ tests: [1653484439.884144][11341:11346] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 [1653484439.884258][11341:11346] CHIP:TOO: AddGroupResponse: { - [1653484439.884310][11341:11346] CHIP:TOO: status: 135 - [1653484439.884346][11341:11346] CHIP:TOO: groupId: 0 + [1653484439.884310][11341:11346] CHIP:TOO: Status: 135 + [1653484439.884346][11341:11346] CHIP:TOO: GroupID: 0 [1653484439.884383][11341:11346] CHIP:TOO: } disabled: true @@ -381,8 +381,8 @@ tests: [1658302176.951047][2747:2752] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 [1658302176.951103][2747:2752] CHIP:TOO: AddGroupResponse: { - [1658302176.951140][2747:2752] CHIP:TOO: status: 126 - [1658302176.951166][2747:2752] CHIP:TOO: groupId: 5 + [1658302176.951140][2747:2752] CHIP:TOO: Status: 126 + [1658302176.951166][2747:2752] CHIP:TOO: GroupID: 5 [1658302176.951189][2747:2752] CHIP:TOO: } disabled: true @@ -397,9 +397,9 @@ tests: 1653484504.667714][11349:11354] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0001 [1653484504.667841][11349:11354] CHIP:TOO: ViewGroupResponse: { - [1653484504.667927][11349:11354] CHIP:TOO: status: 0 - [1653484504.667974][11349:11354] CHIP:TOO: groupId: 1 - [1653484504.668018][11349:11354] CHIP:TOO: groupName: grp1 + [1653484504.667927][11349:11354] CHIP:TOO: Status: 0 + [1653484504.667974][11349:11354] CHIP:TOO: GroupID: 1 + [1653484504.668018][11349:11354] CHIP:TOO: GroupName: grp1 [1653484504.668064][11349:11354] CHIP:TOO: } disabled: true @@ -414,9 +414,9 @@ tests: [1653484611.595344][11412:11417] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0001 [1653484611.595454][11412:11417] CHIP:TOO: ViewGroupResponse: { - [1653484611.595501][11412:11417] CHIP:TOO: status: 135 - [1653484611.595534][11412:11417] CHIP:TOO: groupId: 0 - [1653484611.595565][11412:11417] CHIP:TOO: groupName: + [1653484611.595501][11412:11417] CHIP:TOO: Status: 135 + [1653484611.595534][11412:11417] CHIP:TOO: GroupID: 0 + [1653484611.595565][11412:11417] CHIP:TOO: GroupName: [1653484611.595599][11412:11417] CHIP:TOO: } disabled: true @@ -431,8 +431,8 @@ tests: [1653484876.432744][11451:11456] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0003 [1653484876.432915][11451:11456] CHIP:TOO: RemoveGroupResponse: { - [1653484876.432989][11451:11456] CHIP:TOO: status: 0 - [1653484876.433044][11451:11456] CHIP:TOO: groupId: 1 + [1653484876.432989][11451:11456] CHIP:TOO: Status: 0 + [1653484876.433044][11451:11456] CHIP:TOO: GroupID: 1 [1653484876.433098][11451:11456] CHIP:TOO: } disabled: true @@ -447,9 +447,9 @@ tests: [1653484952.142387][11458:11463] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0001 [1653484952.142476][11458:11463] CHIP:TOO: ViewGroupResponse: { - [1653484952.142516][11458:11463] CHIP:TOO: status: 139 - [1653484952.142541][11458:11463] CHIP:TOO: groupId: 1 - [1653484952.142566][11458:11463] CHIP:TOO: groupName: + [1653484952.142516][11458:11463] CHIP:TOO: Status: 139 + [1653484952.142541][11458:11463] CHIP:TOO: GroupID: 1 + [1653484952.142566][11458:11463] CHIP:TOO: GroupName: [1653484952.142592][11458:11463] CHIP:TOO: } disabled: true @@ -489,8 +489,8 @@ tests: [1653485045.328766][11473:11478] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0003 [1653485045.328896][11473:11478] CHIP:TOO: RemoveGroupResponse: { - [1653485045.328954][11473:11478] CHIP:TOO: status: 135 - [1653485045.328994][11473:11478] CHIP:TOO: groupId: 0 + [1653485045.328954][11473:11478] CHIP:TOO: Status: 135 + [1653485045.328994][11473:11478] CHIP:TOO: GroupID: 0 [1653485045.329036][11473:11478] CHIP:TOO: } disabled: true @@ -505,8 +505,8 @@ tests: [1653485126.672869][11483:11488] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0003 [1653485126.672969][11483:11488] CHIP:TOO: RemoveGroupResponse: { - [1653485126.673015][11483:11488] CHIP:TOO: status: 139 - [1653485126.673045][11483:11488] CHIP:TOO: groupId: 52 + [1653485126.673015][11483:11488] CHIP:TOO: Status: 139 + [1653485126.673045][11483:11488] CHIP:TOO: GroupID: 52 [1653485126.673075][11483:11488] CHIP:TOO: } disabled: true @@ -559,9 +559,9 @@ tests: [1653559917.259920][3227:3232] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0001 [1653559917.259993][3227:3232] CHIP:TOO: ViewGroupResponse: { - [1653559917.260040][3227:3232] CHIP:TOO: status: 139 - [1653559917.260075][3227:3232] CHIP:TOO: groupId: 1 - [1653559917.260107][3227:3232] CHIP:TOO: groupName: + [1653559917.260040][3227:3232] CHIP:TOO: Status: 139 + [1653559917.260075][3227:3232] CHIP:TOO: GroupID: 1 + [1653559917.260107][3227:3232] CHIP:TOO: GroupName: [1653559917.260138][3227:3232] CHIP:TOO: } disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml index 899cf13ebeaf26..5b4fb88b13eff9 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml @@ -235,8 +235,8 @@ tests: [1653552285.195099][2464:2469] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 [1653552285.197783][2464:2469] CHIP:TOO: AddGroupResponse: { - [1653552285.197849][2464:2469] CHIP:TOO: status: 0 - [1653552285.197877][2464:2469] CHIP:TOO: groupId: 2 + [1653552285.197849][2464:2469] CHIP:TOO: Status: 0 + [1653552285.197877][2464:2469] CHIP:TOO: GroupID: 2 [1653552285.197933][2464:2469] CHIP:TOO: } disabled: true @@ -269,8 +269,8 @@ tests: [1653552417.870291][2482:2487] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 [1653552417.870407][2482:2487] CHIP:TOO: AddGroupResponse: { - [1653552417.870462][2482:2487] CHIP:TOO: status: 0 - [1653552417.870500][2482:2487] CHIP:TOO: groupId: 3 + [1653552417.870462][2482:2487] CHIP:TOO: Status: 0 + [1653552417.870500][2482:2487] CHIP:TOO: GroupID: 3 [1653552417.870539][2482:2487] CHIP:TOO: } disabled: true @@ -312,8 +312,8 @@ tests: [1653552493.052711][2501:2506] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0002 [1653552493.052792][2501:2506] CHIP:TOO: GetGroupMembershipResponse: { - [1653552493.052819][2501:2506] CHIP:TOO: capacity: null - [1653552493.052870][2501:2506] CHIP:TOO: groupList: 2 entries + [1653552493.052819][2501:2506] CHIP:TOO: Capacity: null + [1653552493.052870][2501:2506] CHIP:TOO: GroupList: 2 entries [1653552493.052922][2501:2506] CHIP:TOO: [1]: 2 [1653552493.052950][2501:2506] CHIP:TOO: [2]: 3 [1653552493.052978][2501:2506] CHIP:TOO: } @@ -330,8 +330,8 @@ tests: [1653294426.515523][3638:3643] CHIP:TOO: GetGroupMembershipResponse: { - [1653294426.515571][3638:3643] CHIP:TOO: capacity: null - [1653294426.515649][3638:3643] CHIP:TOO: groupList: 1 entries + [1653294426.515571][3638:3643] CHIP:TOO: Capacity: null + [1653294426.515649][3638:3643] CHIP:TOO: GroupList: 1 entries [1653294426.515737][3638:3643] CHIP:TOO: [1]: 2 [1653294426.515916][3638:3643] CHIP:TOO: } disabled: true @@ -348,8 +348,8 @@ tests: Verify "grouplist entries" on the TH(Chip-tool) Log: [1653294490.030740][3646:3651] CHIP:TOO: GetGroupMembershipResponse: { - [1653294490.030775][3646:3651] CHIP:TOO: capacity: null - [1653294490.030838][3646:3651] CHIP:TOO: groupList: 2 entries + [1653294490.030775][3646:3651] CHIP:TOO: Capacity: null + [1653294490.030838][3646:3651] CHIP:TOO: GroupList: 2 entries [1653294490.030907][3646:3651] CHIP:TOO: [1]: 2 [1653294490.030943][3646:3651] CHIP:TOO: [2]: 3 [1653294490.030979][3646:3651] CHIP:TOO: } diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml index c43a0ceacc8e61..970d252bbc6029 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml @@ -64,7 +64,7 @@ tests: PICS: OO.S.C40.Rsp arguments: values: - - name: "EffectId" + - name: "EffectIdentifier" value: 0 - name: "EffectVariant" value: 0 @@ -122,7 +122,7 @@ tests: PICS: OO.S.C40.Rsp arguments: values: - - name: "EffectId" + - name: "EffectIdentifier" value: 0 - name: "EffectVariant" value: 0 @@ -180,7 +180,7 @@ tests: PICS: OO.S.C40.Rsp arguments: values: - - name: "EffectId" + - name: "EffectIdentifier" value: 1 - name: "EffectVariant" value: 0 @@ -416,7 +416,7 @@ tests: PICS: OO.S.C40.Rsp arguments: values: - - name: "EffectId" + - name: "EffectIdentifier" value: 0 - name: "EffectVariant" value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml index 91fcdcf8911002..ab5035d6a97d64 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml @@ -126,8 +126,8 @@ tests: [1651218084.427102][2526:2531] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 [1651218084.427203][2526:2531] CHIP:TOO: AddGroupResponse: { - [1651218084.427241][2526:2531] CHIP:TOO: status: 0 - [1651218084.427264][2526:2531] CHIP:TOO: groupId: 1 + [1651218084.427241][2526:2531] CHIP:TOO: Status: 0 + [1651218084.427264][2526:2531] CHIP:TOO: GroupID: 1 [1651218084.427314][2526:2531] CHIP:TOO: } disabled: true @@ -141,8 +141,8 @@ tests: [1651218576.149152][2635:2640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0001 [1651218576.149231][2635:2640] CHIP:TOO: ViewGroupResponse: { - [1651218576.149265][2635:2640] CHIP:TOO: status: 0 - [1651218576.149289][2635:2640] CHIP:TOO: groupId: 1 + [1651218576.149265][2635:2640] CHIP:TOO: Status: 0 + [1651218576.149289][2635:2640] CHIP:TOO: GroupID: 1 [1651218576.149311][2635:2640] CHIP:TOO: groupName: grp1 [1651218576.149335][2635:2640] CHIP:TOO: } disabled: true @@ -158,8 +158,8 @@ tests: [1651218576.149152][2635:2640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0001 [1651218576.149231][2635:2640] CHIP:TOO: ViewGroupResponse: { - [1651218576.149265][2635:2640] CHIP:TOO: status: 0 - [1651218576.149289][2635:2640] CHIP:TOO: groupId: 1 + [1651218576.149265][2635:2640] CHIP:TOO: Status: 0 + [1651218576.149289][2635:2640] CHIP:TOO: GroupID: 1 [1651218576.149311][2635:2640] CHIP:TOO: groupName: grp1 [1651218576.149335][2635:2640] CHIP:TOO: } disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml b/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml index b3d5cf344862ad..d1fc484a21ec0b 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml @@ -44,7 +44,7 @@ tests: verify on chip-tool logs: - [1651277342848] [26860:35431852] CHIP: [TOO] DefaultOtaProviders: 1 entries + [1651277342848] [26860:35431852] CHIP: [TOO] DefaultOTAProviders: 1 entries [1651277342848] [26860:35431852] CHIP: [TOO] [1]: { [1651277342848] [26860:35431852] CHIP: [TOO] ProviderNodeID: 1 [1651277342848] [26860:35431852] CHIP: [TOO] Endpoint: 0 @@ -72,7 +72,7 @@ tests: verify on chip-tool logs: - [1651277342848] [26860:35431852] CHIP: [TOO] DefaultOtaProviders: 1 entries + [1651277342848] [26860:35431852] CHIP: [TOO] DefaultOTAProviders: 1 entries [1651277342848] [26860:35431852] CHIP: [TOO] [1]: { [1651277342848] [26860:35431852] CHIP: [TOO] ProviderNodeID: 1 [1651277342848] [26860:35431852] CHIP: [TOO] Endpoint: 0 @@ -83,7 +83,7 @@ tests: verify on chip-tool logs: - [1651277543492] [26864:35434761] CHIP: [TOO] DefaultOtaProviders: 1 entries + [1651277543492] [26864:35434761] CHIP: [TOO] DefaultOTAProviders: 1 entries [1651277543492] [26864:35434761] CHIP: [TOO] [1]: { [1651277543492] [26864:35434761] CHIP: [TOO] ProviderNodeID: 5 [1651277543492] [26864:35434761] CHIP: [TOO] Endpoint: 0 @@ -108,7 +108,7 @@ tests: verify on chip-tool logs: - [1651277342848] [26860:35431852] CHIP: [TOO] DefaultOtaProviders: 1 entries + [1651277342848] [26860:35431852] CHIP: [TOO] DefaultOTAProviders: 1 entries [1651277342848] [26860:35431852] CHIP: [TOO] [1]: { [1651277342848] [26860:35431852] CHIP: [TOO] ProviderNodeID: 10 [1651277342848] [26860:35431852] CHIP: [TOO] Endpoint: 0 @@ -119,7 +119,7 @@ tests: verify on chip-tool logs: - [1651277543492] [26864:35434761] CHIP: [TOO] DefaultOtaProviders: 1 entries + [1651277543492] [26864:35434761] CHIP: [TOO] DefaultOTAProviders: 1 entries [1651277543492] [26864:35434761] CHIP: [TOO] [1]: { [1651277543492] [26864:35434761] CHIP: [TOO] ProviderNodeID: 5 [1651277543492] [26864:35434761] CHIP: [TOO] Endpoint: 0 @@ -144,7 +144,7 @@ tests: verify on chip-tool logs: - [1651277342848] [26860:35431852] CHIP: [TOO] DefaultOtaProviders: 1 entries + [1651277342848] [26860:35431852] CHIP: [TOO] DefaultOTAProviders: 1 entries [1651277342848] [26860:35431852] CHIP: [TOO] [1]: { [1651277342848] [26860:35431852] CHIP: [TOO] ProviderNodeID: 10 [1651277342848] [26860:35431852] CHIP: [TOO] Endpoint: 0 @@ -155,7 +155,7 @@ tests: verify on chip-tool logs: - [1651280268033] [27804:35481732] CHIP: [TOO] DefaultOtaProviders: 0 entries + [1651280268033] [27804:35481732] CHIP: [TOO] DefaultOTAProviders: 0 entries disabled: true - label: diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp index fdd6dc6e9ed536..ad4bf1603a258d 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp @@ -37,8 +37,11 @@ CHIP_ERROR InteractionModel::ReadAttribute(const char * identity, EndpointId end dataVersions.Value().push_back(dataVersion.Value()); } - return InteractionModelReports::ReadAttribute(device, endpointIds, clusterIds, attributeIds, Optional(fabricFiltered), - dataVersions); + InteractionModelReports::ResetOptions(); + InteractionModelReports::SetFabricFiltered(fabricFiltered); + InteractionModelReports::SetDataVersions(dataVersions); + + return InteractionModelReports::ReadAttribute(device, endpointIds, clusterIds, attributeIds); } CHIP_ERROR InteractionModel::ReadEvent(const char * identity, EndpointId endpointId, ClusterId clusterId, EventId eventId, @@ -50,8 +53,12 @@ CHIP_ERROR InteractionModel::ReadEvent(const char * identity, EndpointId endpoin std::vector endpointIds = { endpointId }; std::vector clusterIds = { clusterId }; std::vector eventIds = { eventId }; - return InteractionModelReports::ReadEvent(device, endpointIds, clusterIds, eventIds, Optional(fabricFiltered), - eventNumber); + + InteractionModelReports::ResetOptions(); + InteractionModelReports::SetFabricFiltered(fabricFiltered); + InteractionModelReports::SetEventNumber(eventNumber); + + return InteractionModelReports::ReadEvent(device, endpointIds, clusterIds, eventIds); } CHIP_ERROR InteractionModel::SubscribeAttribute(const char * identity, EndpointId endpointId, ClusterId clusterId, @@ -72,9 +79,15 @@ CHIP_ERROR InteractionModel::SubscribeAttribute(const char * identity, EndpointI dataVersions.Value().push_back(dataVersion.Value()); } - return InteractionModelReports::SubscribeAttribute(device, endpointIds, clusterIds, attributeIds, minInterval, maxInterval, - Optional(fabricFiltered), dataVersions, keepSubscriptions, - autoResubscribe); + InteractionModelReports::ResetOptions(); + InteractionModelReports::SetMinInterval(minInterval); + InteractionModelReports::SetMaxInterval(maxInterval); + InteractionModelReports::SetFabricFiltered(fabricFiltered); + InteractionModelReports::SetDataVersions(dataVersions); + InteractionModelReports::SetKeepSubscriptions(keepSubscriptions); + InteractionModelReports::SetAutoResubscribe(autoResubscribe); + + return InteractionModelReports::SubscribeAttribute(device, endpointIds, clusterIds, attributeIds); } CHIP_ERROR InteractionModel::SubscribeEvent(const char * identity, EndpointId endpointId, ClusterId clusterId, EventId eventId, @@ -88,9 +101,16 @@ CHIP_ERROR InteractionModel::SubscribeEvent(const char * identity, EndpointId en std::vector endpointIds = { endpointId }; std::vector clusterIds = { clusterId }; std::vector eventIds = { eventId }; - return InteractionModelReports::SubscribeEvent(device, endpointIds, clusterIds, eventIds, minInterval, maxInterval, - Optional(fabricFiltered), eventNumber, keepSubscriptions, NullOptional, - autoResubscribe); + + InteractionModelReports::ResetOptions(); + SetMinInterval(minInterval); + SetMaxInterval(maxInterval); + SetFabricFiltered(fabricFiltered); + SetEventNumber(eventNumber); + SetKeepSubscriptions(keepSubscriptions); + SetAutoResubscribe(autoResubscribe); + + return InteractionModelReports::SubscribeEvent(device, endpointIds, clusterIds, eventIds); } void InteractionModel::Shutdown() @@ -281,15 +301,11 @@ CHIP_ERROR InteractionModelConfig::GetAttributePaths(std::vector end CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, - ReadClient::InteractionType interactionType, uint16_t minInterval, - uint16_t maxInterval, const Optional & fabricFiltered, - const Optional> & dataVersions, - const Optional & keepSubscriptions, - const Optional & autoResubscribe) + ReadClient::InteractionType interactionType) { InteractionModelConfig::AttributePathsConfig pathsConfig; ReturnErrorOnFailure( - InteractionModelConfig::GetAttributePaths(endpointIds, clusterIds, attributeIds, dataVersions, pathsConfig)); + InteractionModelConfig::GetAttributePaths(endpointIds, clusterIds, attributeIds, mDataVersions, pathsConfig)); ChipLogProgress(chipTool, "Sending %sAttribute to:", interactionType == ReadClient::InteractionType::Subscribe ? "Subscribe" : "Read"); @@ -300,12 +316,12 @@ CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::v params.mpAttributePathParamsList = pathsConfig.attributePathParams.get(); params.mAttributePathParamsListSize = pathsConfig.count; - if (fabricFiltered.HasValue()) + if (mFabricFiltered.HasValue()) { - params.mIsFabricFiltered = fabricFiltered.Value(); + params.mIsFabricFiltered = mFabricFiltered.Value(); } - if (dataVersions.HasValue()) + if (mDataVersions.HasValue()) { params.mpDataVersionFilterList = pathsConfig.dataVersionFilter.get(); params.mDataVersionFilterListSize = pathsConfig.count; @@ -313,11 +329,11 @@ CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::v if (interactionType == ReadClient::InteractionType::Subscribe) { - params.mMinIntervalFloorSeconds = minInterval; - params.mMaxIntervalCeilingSeconds = maxInterval; - if (keepSubscriptions.HasValue()) + params.mMinIntervalFloorSeconds = mMinInterval; + params.mMaxIntervalCeilingSeconds = mMaxInterval; + if (mKeepSubscriptions.HasValue()) { - params.mKeepSubscriptions = keepSubscriptions.Value(); + params.mKeepSubscriptions = mKeepSubscriptions.Value(); } } @@ -327,10 +343,10 @@ CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::v { ReturnErrorOnFailure(client->SendRequest(params)); } - else if (autoResubscribe.ValueOr(false)) + else if (mAutoResubscribe.ValueOr(false)) { pathsConfig.attributePathParams.release(); - if (dataVersions.HasValue()) + if (mDataVersions.HasValue()) { pathsConfig.dataVersionFilter.release(); } @@ -348,16 +364,12 @@ CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::v CHIP_ERROR InteractionModelReports::ReportEvent(DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector eventIds, - ReadClient::InteractionType interactionType, uint16_t minInterval, - uint16_t maxInterval, const Optional & fabricFiltered, - const Optional & eventNumber, const Optional & keepSubscriptions, - const Optional> & isUrgents, - const Optional & autoResubscribe) + chip::app::ReadClient::InteractionType interactionType) { const size_t clusterCount = clusterIds.size(); const size_t eventCount = eventIds.size(); const size_t endpointCount = endpointIds.size(); - const size_t isUrgentCount = isUrgents.HasValue() ? isUrgents.Value().size() : 0; + const size_t isUrgentCount = mIsUrgents.HasValue() ? mIsUrgents.Value().size() : 0; VerifyOrReturnError(clusterCount > 0 && clusterCount <= kMaxAllowedPaths, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(eventCount > 0 && eventCount <= kMaxAllowedPaths, CHIP_ERROR_INVALID_ARGUMENT); @@ -426,37 +438,37 @@ CHIP_ERROR InteractionModelReports::ReportEvent(DeviceProxy * device, std::vecto eventPathParams[i].mEndpointId = endpointId; } - if (isUrgents.HasValue() && isUrgents.Value().size() > i) + if (mIsUrgents.HasValue() && mIsUrgents.Value().size() > i) { - eventPathParams[i].mIsUrgentEvent = isUrgents.Value().at(i); + eventPathParams[i].mIsUrgentEvent = mIsUrgents.Value().at(i); } } ReadPrepareParams params(device->GetSecureSession().Value()); params.mpEventPathParamsList = eventPathParams.get(); params.mEventPathParamsListSize = pathsCount; - params.mEventNumber = eventNumber; + params.mEventNumber = mEventNumber; params.mpAttributePathParamsList = nullptr; params.mAttributePathParamsListSize = 0; - if (fabricFiltered.HasValue()) + if (mFabricFiltered.HasValue()) { - params.mIsFabricFiltered = fabricFiltered.Value(); + params.mIsFabricFiltered = mFabricFiltered.Value(); } if (interactionType == ReadClient::InteractionType::Subscribe) { - params.mMinIntervalFloorSeconds = minInterval; - params.mMaxIntervalCeilingSeconds = maxInterval; - if (keepSubscriptions.HasValue()) + params.mMinIntervalFloorSeconds = mMinInterval; + params.mMaxIntervalCeilingSeconds = mMaxInterval; + if (mKeepSubscriptions.HasValue()) { - params.mKeepSubscriptions = keepSubscriptions.Value(); + params.mKeepSubscriptions = mKeepSubscriptions.Value(); } } auto client = std::make_unique(InteractionModelEngine::GetInstance(), device->GetExchangeManager(), mBufferedReadAdapter, interactionType); - if (autoResubscribe.ValueOr(false)) + if (mAutoResubscribe.ValueOr(false)) { eventPathParams.release(); ReturnErrorOnFailure(client->SendAutoResubscribeRequest(std::move(params))); @@ -479,11 +491,7 @@ void InteractionModelReports::CleanupReadClient(ReadClient * aReadClient) CHIP_ERROR InteractionModelReports::ReportAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, std::vector eventIds, - chip::app::ReadClient::InteractionType interactionType, uint16_t minInterval, - uint16_t maxInterval, const chip::Optional & fabricFiltered, - const chip::Optional> & dataVersions, - const chip::Optional & eventNumber, - const chip::Optional & keepSubscriptions) + chip::app::ReadClient::InteractionType interactionType) { const size_t endpointCount = endpointIds.size(); const size_t clusterCount = clusterIds.size(); @@ -578,22 +586,22 @@ CHIP_ERROR InteractionModelReports::ReportAll(chip::DeviceProxy * device, std::v ReadPrepareParams params(device->GetSecureSession().Value()); params.mpEventPathParamsList = eventPathParams; params.mEventPathParamsListSize = eventCount; - params.mEventNumber = eventNumber; + params.mEventNumber = mEventNumber; params.mpAttributePathParamsList = attributePathParams; params.mAttributePathParamsListSize = attributeCount; - if (fabricFiltered.HasValue()) + if (mFabricFiltered.HasValue()) { - params.mIsFabricFiltered = fabricFiltered.Value(); + params.mIsFabricFiltered = mFabricFiltered.Value(); } if (interactionType == ReadClient::InteractionType::Subscribe) { - params.mMinIntervalFloorSeconds = minInterval; - params.mMaxIntervalCeilingSeconds = maxInterval; - if (keepSubscriptions.HasValue()) + params.mMinIntervalFloorSeconds = mMinInterval; + params.mMaxIntervalCeilingSeconds = mMaxInterval; + if (mKeepSubscriptions.HasValue()) { - params.mKeepSubscriptions = keepSubscriptions.Value(); + params.mKeepSubscriptions = mKeepSubscriptions.Value(); } } diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.h b/src/app/tests/suites/commands/interaction_model/InteractionModel.h index c16318070a68ae..83a0d6fff769b6 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.h +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.h @@ -49,91 +49,59 @@ class InteractionModelConfig class InteractionModelReports { public: - InteractionModelReports(chip::app::ReadClient::Callback * callback) : mBufferedReadAdapter(*callback) {} + InteractionModelReports(chip::app::ReadClient::Callback * callback) : mBufferedReadAdapter(*callback) { ResetOptions(); } protected: CHIP_ERROR ReadAttribute(chip::DeviceProxy * device, std::vector endpointIds, - std::vector clusterIds, std::vector attributeIds, - const chip::Optional & fabricFiltered = chip::Optional(true), - const chip::Optional> & dataVersions = chip::NullOptional) + std::vector clusterIds, std::vector attributeIds) { - return ReportAttribute(device, endpointIds, clusterIds, attributeIds, chip::app::ReadClient::InteractionType::Read, 0, 0, - fabricFiltered, dataVersions, chip::NullOptional, chip::NullOptional); + return ReportAttribute(device, endpointIds, clusterIds, attributeIds, chip::app::ReadClient::InteractionType::Read); } CHIP_ERROR SubscribeAttribute(chip::DeviceProxy * device, std::vector endpointIds, - std::vector clusterIds, std::vector attributeIds, - uint16_t minInterval, uint16_t maxInterval, const chip::Optional & fabricFiltered, - const chip::Optional> & dataVersions, - const chip::Optional & keepSubscriptions, const chip::Optional & autoResubscribe) + std::vector clusterIds, std::vector attributeIds) { - return ReportAttribute(device, endpointIds, clusterIds, attributeIds, chip::app::ReadClient::InteractionType::Subscribe, - minInterval, maxInterval, fabricFiltered, dataVersions, keepSubscriptions, autoResubscribe); + return ReportAttribute(device, endpointIds, clusterIds, attributeIds, chip::app::ReadClient::InteractionType::Subscribe); } CHIP_ERROR ReportAttribute(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, - chip::app::ReadClient::InteractionType interactionType, uint16_t minInterval, uint16_t maxInterval, - const chip::Optional & fabricFiltered, - const chip::Optional> & dataVersions, - const chip::Optional & keepSubscriptions, const chip::Optional & autoResubscribe); + chip::app::ReadClient::InteractionType interactionType); CHIP_ERROR ReadEvent(chip::DeviceProxy * device, std::vector endpointIds, - std::vector clusterIds, std::vector eventIds, - const chip::Optional & fabricFiltered = chip::Optional(true), - const chip::Optional & eventNumber = chip::NullOptional) + std::vector clusterIds, std::vector eventIds) { - return ReportEvent(device, endpointIds, clusterIds, eventIds, chip::app::ReadClient::InteractionType::Read, 0, 0, - fabricFiltered, eventNumber, chip::NullOptional, chip::NullOptional, chip::NullOptional); + return ReportEvent(device, endpointIds, clusterIds, eventIds, chip::app::ReadClient::InteractionType::Read); } CHIP_ERROR SubscribeEvent(chip::DeviceProxy * device, std::vector endpointIds, - std::vector clusterIds, std::vector eventIds, uint16_t minInterval, - uint16_t maxInterval, const chip::Optional & fabricFiltered, - const chip::Optional & eventNumber, const chip::Optional & keepSubscriptions, - const chip::Optional> & isUrgents, const chip::Optional & autoResubscribe) + std::vector clusterIds, std::vector eventIds) { - return ReportEvent(device, endpointIds, clusterIds, eventIds, chip::app::ReadClient::InteractionType::Subscribe, - minInterval, maxInterval, fabricFiltered, eventNumber, keepSubscriptions, isUrgents, autoResubscribe); + return ReportEvent(device, endpointIds, clusterIds, eventIds, chip::app::ReadClient::InteractionType::Subscribe); } CHIP_ERROR ReportEvent(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector eventIds, - chip::app::ReadClient::InteractionType interactionType, uint16_t minInterval, uint16_t maxInterval, - const chip::Optional & fabricFiltered, const chip::Optional & eventNumber, - const chip::Optional & keepSubscriptions, const chip::Optional> & isUrgents, - const chip::Optional & autoResubscribe); + chip::app::ReadClient::InteractionType interactionType); CHIP_ERROR ReadAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, - std::vector eventIds, - const chip::Optional & fabricFiltered = chip::Optional(true), - const chip::Optional> & dataVersions = chip::NullOptional, - const chip::Optional & eventNumber = chip::NullOptional) + std::vector eventIds) { - return ReportAll(device, endpointIds, clusterIds, attributeIds, eventIds, chip::app::ReadClient::InteractionType::Read, 0, - 0, fabricFiltered, dataVersions, eventNumber); + return ReportAll(device, endpointIds, clusterIds, attributeIds, eventIds, chip::app::ReadClient::InteractionType::Read); } CHIP_ERROR SubscribeAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, - std::vector eventIds, uint16_t minInterval = 0, uint16_t maxInterval = 0, - const chip::Optional & fabricFiltered = chip::Optional(true), - const chip::Optional & eventNumber = chip::NullOptional, - const chip::Optional & keepSubscriptions = chip::NullOptional) + std::vector eventIds) { - return ReportAll(device, endpointIds, clusterIds, attributeIds, eventIds, chip::app::ReadClient::InteractionType::Subscribe, - minInterval, maxInterval, fabricFiltered, chip::NullOptional, eventNumber, keepSubscriptions); + return ReportAll(device, endpointIds, clusterIds, attributeIds, eventIds, + chip::app::ReadClient::InteractionType::Subscribe); } CHIP_ERROR ReportAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, - std::vector eventIds, chip::app::ReadClient::InteractionType interactionType, - uint16_t minInterval = 0, uint16_t maxInterval = 0, - const chip::Optional & fabricFiltered = chip::Optional(true), - const chip::Optional> & dataVersions = chip::NullOptional, - const chip::Optional & eventNumber = chip::NullOptional, - const chip::Optional & keepSubscriptions = chip::NullOptional); + std::vector eventIds, chip::app::ReadClient::InteractionType interactionType); void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams); @@ -143,40 +111,135 @@ class InteractionModelReports std::vector> mReadClients; chip::app::BufferedReadCallback mBufferedReadAdapter; + + InteractionModelReports & SetDataVersions(const std::vector & dataVersions) + { + mDataVersions.SetValue(dataVersions); + return *this; + } + + InteractionModelReports & SetDataVersions(const chip::Optional> & dataVersions) + { + mDataVersions = dataVersions; + return *this; + } + + InteractionModelReports & SetIsUrgents(const std::vector isUrgents) + { + mIsUrgents.SetValue(isUrgents); + return *this; + } + + InteractionModelReports & SetIsUrgents(const chip::Optional> & isUrgents) + { + mIsUrgents = isUrgents; + return *this; + } + + InteractionModelReports & SetEventNumber(const chip::Optional & eventNumber) + { + mEventNumber = eventNumber; + return *this; + } + + InteractionModelReports & SetEventNumber(chip::EventNumber eventNumber) + { + mEventNumber.SetValue(eventNumber); + return *this; + } + + InteractionModelReports & SetFabricFiltered(bool fabricFiltered) + { + mFabricFiltered.SetValue(fabricFiltered); + return *this; + } + + InteractionModelReports & SetKeepSubscriptions(bool keepSubscriptions) + { + mKeepSubscriptions.SetValue(keepSubscriptions); + return *this; + } + + InteractionModelReports & SetKeepSubscriptions(const chip::Optional & keepSubscriptions) + { + mKeepSubscriptions = keepSubscriptions; + return *this; + } + + InteractionModelReports & SetAutoResubscribe(bool autoResubscribe) + { + mAutoResubscribe.SetValue(autoResubscribe); + return *this; + } + + InteractionModelReports & SetAutoResubscribe(const chip::Optional & autoResubscribe) + { + mAutoResubscribe = autoResubscribe; + return *this; + } + + InteractionModelReports & SetMinInterval(uint16_t minInterval) + { + mMinInterval = minInterval; + return *this; + } + + InteractionModelReports & SetMaxInterval(uint16_t maxInterval) + { + mMaxInterval = maxInterval; + return *this; + } + + void ResetOptions() + { + mDataVersions = chip::NullOptional; + mIsUrgents = chip::NullOptional; + mEventNumber = chip::NullOptional; + mFabricFiltered = chip::Optional(true); + mKeepSubscriptions = chip::NullOptional; + mAutoResubscribe = chip::NullOptional; + mMinInterval = 0; + mMaxInterval = 0; + } + + chip::Optional> mDataVersions; + chip::Optional> mIsUrgents; + chip::Optional mEventNumber; + chip::Optional mFabricFiltered; + chip::Optional mKeepSubscriptions; + chip::Optional mAutoResubscribe; + uint16_t mMinInterval; + uint16_t mMaxInterval; }; class InteractionModelCommands { public: - InteractionModelCommands(chip::app::CommandSender::Callback * callback) : mCallback(callback) {} + InteractionModelCommands(chip::app::CommandSender::Callback * callback) : mCallback(callback) { ResetOptions(); } protected: template CHIP_ERROR SendCommand(chip::DeviceProxy * device, chip::EndpointId endpointId, chip::ClusterId clusterId, - chip::CommandId commandId, const T & value, - const chip::Optional & timedInteractionTimeoutMs = chip::NullOptional, - const chip::Optional & suppressResponse = chip::NullOptional, - const chip::Optional & repeatCount = chip::NullOptional, - const chip::Optional & repeatDelayInMs = chip::NullOptional) + chip::CommandId commandId, const T & value) { - uint16_t repeat = repeatCount.ValueOr(1); + uint16_t repeat = mRepeatCount.ValueOr(1); while (repeat--) { chip::app::CommandPathParams commandPath = { endpointId, clusterId, commandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; auto commandSender = std::make_unique(mCallback, device->GetExchangeManager(), - timedInteractionTimeoutMs.HasValue()); + mTimedInteractionTimeoutMs.HasValue()); VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(commandSender->AddRequestDataNoTimedCheck(commandPath, value, timedInteractionTimeoutMs, - suppressResponse.ValueOr(false))); + ReturnErrorOnFailure(commandSender->AddRequestDataNoTimedCheck(commandPath, value, mTimedInteractionTimeoutMs, + mSuppressResponse.ValueOr(false))); ReturnErrorOnFailure(commandSender->SendCommandRequest(device->GetSecureSession().Value())); mCommandSender.push_back(std::move(commandSender)); - if (repeatDelayInMs.HasValue()) + if (mRepeatDelayInMs.HasValue()) { - chip::test_utils::SleepMillis(repeatDelayInMs.Value()); + chip::test_utils::SleepMillis(mRepeatDelayInMs.Value()); } } return CHIP_NO_ERROR; @@ -209,6 +272,67 @@ class InteractionModelCommands std::vector> mCommandSender; chip::app::CommandSender::Callback * mCallback; + + InteractionModelCommands & SetTimedInteractionTimeoutMs(uint16_t timedInteractionTimeoutMs) + { + mTimedInteractionTimeoutMs.SetValue(timedInteractionTimeoutMs); + return *this; + } + + InteractionModelCommands & SetTimedInteractionTimeoutMs(const chip::Optional & timedInteractionTimeoutMs) + { + mTimedInteractionTimeoutMs = timedInteractionTimeoutMs; + return *this; + } + + InteractionModelCommands & SetSuppressResponse(bool suppressResponse) + { + mSuppressResponse.SetValue(suppressResponse); + return *this; + } + + InteractionModelCommands & SetSuppressResponse(const chip::Optional & suppressResponse) + { + mSuppressResponse = suppressResponse; + return *this; + } + + InteractionModelCommands & SetRepeatCount(uint16_t repeatCount) + { + mRepeatCount.SetValue(repeatCount); + return *this; + } + + InteractionModelCommands & SetRepeatCount(const chip::Optional & repeatCount) + { + mRepeatCount = repeatCount; + return *this; + } + + InteractionModelCommands & SetRepeatDelayInMs(uint16_t repeatDelayInMs) + { + mRepeatDelayInMs.SetValue(repeatDelayInMs); + return *this; + } + + InteractionModelCommands & SetRepeatDelayInMs(const chip::Optional & repeatDelayInMs) + { + mRepeatDelayInMs = repeatDelayInMs; + return *this; + } + + void ResetOptions() + { + mTimedInteractionTimeoutMs = chip::NullOptional; + mSuppressResponse = chip::NullOptional; + mRepeatCount = chip::NullOptional; + mRepeatDelayInMs = chip::NullOptional; + } + + chip::Optional mTimedInteractionTimeoutMs; + chip::Optional mSuppressResponse; + chip::Optional mRepeatCount; + chip::Optional mRepeatDelayInMs; }; class InteractionModelWriter @@ -220,25 +344,20 @@ class InteractionModelWriter template CHIP_ERROR WriteAttribute(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, - const std::vector & values, - const chip::Optional & timedInteractionTimeoutMs = chip::NullOptional, - const chip::Optional & suppressResponse = chip::NullOptional, - const chip::Optional> & dataVersions = chip::NullOptional, - const chip::Optional & repeatCount = chip::NullOptional, - const chip::Optional & repeatDelayInMs = chip::NullOptional) + const std::vector & values) { InteractionModelConfig::AttributePathsConfig pathsConfig; ReturnErrorOnFailure( - InteractionModelConfig::GetAttributePaths(endpointIds, clusterIds, attributeIds, dataVersions, pathsConfig)); + InteractionModelConfig::GetAttributePaths(endpointIds, clusterIds, attributeIds, mDataVersions, pathsConfig)); VerifyOrReturnError(pathsConfig.count == values.size() || values.size() == 1, CHIP_ERROR_INVALID_ARGUMENT); - uint16_t repeat = repeatCount.ValueOr(1); + uint16_t repeat = mRepeatCount.ValueOr(1); while (repeat--) { mWriteClient = std::make_unique(device->GetExchangeManager(), &mChunkedWriteCallback, - timedInteractionTimeoutMs, suppressResponse.ValueOr(false)); + mTimedInteractionTimeoutMs, mSuppressResponse.ValueOr(false)); VerifyOrReturnError(mWriteClient != nullptr, CHIP_ERROR_NO_MEMORY); for (uint8_t i = 0; i < pathsConfig.count; i++) @@ -251,9 +370,9 @@ class InteractionModelWriter ReturnErrorOnFailure(mWriteClient->SendWriteRequest(device->GetSecureSession().Value())); - if (repeatDelayInMs.HasValue()) + if (mRepeatDelayInMs.HasValue()) { - chip::test_utils::SleepMillis(repeatDelayInMs.Value()); + chip::test_utils::SleepMillis(mRepeatDelayInMs.Value()); } } @@ -262,16 +381,10 @@ class InteractionModelWriter template CHIP_ERROR WriteAttribute(chip::DeviceProxy * device, std::vector endpointIds, - std::vector clusterIds, std::vector attributeIds, const T & value, - const chip::Optional & timedInteractionTimeoutMs = chip::NullOptional, - const chip::Optional & suppressResponse = chip::NullOptional, - const chip::Optional> & dataVersions = chip::NullOptional, - const chip::Optional & repeatCount = chip::NullOptional, - const chip::Optional & repeatDelayInMs = chip::NullOptional) + std::vector clusterIds, std::vector attributeIds, const T & value) { std::vector values = { value }; - return WriteAttribute(device, endpointIds, clusterIds, attributeIds, values, timedInteractionTimeoutMs, suppressResponse, - dataVersions, repeatCount, repeatDelayInMs); + return WriteAttribute(device, endpointIds, clusterIds, attributeIds, values); } template @@ -314,6 +427,81 @@ class InteractionModelWriter std::unique_ptr mWriteClient; chip::app::ChunkedWriteCallback mChunkedWriteCallback; + InteractionModelWriter & SetTimedInteractionTimeoutMs(uint16_t timedInteractionTimeoutMs) + { + mTimedInteractionTimeoutMs.SetValue(timedInteractionTimeoutMs); + return *this; + } + + InteractionModelWriter & SetTimedInteractionTimeoutMs(const chip::Optional & timedInteractionTimeoutMs) + { + mTimedInteractionTimeoutMs = timedInteractionTimeoutMs; + return *this; + } + + InteractionModelWriter & SetSuppressResponse(bool suppressResponse) + { + mSuppressResponse.SetValue(suppressResponse); + return *this; + } + + InteractionModelWriter & SetSuppressResponse(const chip::Optional & suppressResponse) + { + mSuppressResponse = suppressResponse; + return *this; + } + + InteractionModelWriter & SetDataVersions(const std::vector & dataVersions) + { + mDataVersions.SetValue(dataVersions); + return *this; + } + + InteractionModelWriter & SetDataVersions(const chip::Optional> & dataVersions) + { + mDataVersions = dataVersions; + return *this; + } + + InteractionModelWriter & SetRepeatCount(uint16_t repeatCount) + { + mRepeatCount.SetValue(repeatCount); + return *this; + } + + InteractionModelWriter & SetRepeatCount(const chip::Optional & repeatCount) + { + mRepeatCount = repeatCount; + return *this; + } + + InteractionModelWriter & SetRepeatDelayInMs(uint16_t repeatDelayInMs) + { + mRepeatDelayInMs.SetValue(repeatDelayInMs); + return *this; + } + + InteractionModelWriter & SetRepeatDelayInMs(const chip::Optional & repeatDelayInMs) + { + mRepeatDelayInMs = repeatDelayInMs; + return *this; + } + + void ResetOptions() + { + mTimedInteractionTimeoutMs = chip::NullOptional; + mSuppressResponse = chip::NullOptional; + mDataVersions = chip::NullOptional; + mRepeatCount = chip::NullOptional; + mRepeatDelayInMs = chip::NullOptional; + } + + chip::Optional mTimedInteractionTimeoutMs; + chip::Optional> mDataVersions; + chip::Optional mSuppressResponse; + chip::Optional mRepeatCount; + chip::Optional mRepeatDelayInMs; + private: template CHIP_ERROR EncodeAttribute(const chip::app::AttributePathParams & path, const chip::Optional & dataVersion, @@ -385,8 +573,12 @@ class InteractionModel : public InteractionModelReports, optionalDataVersions.SetValue(dataVersions); } - return InteractionModelWriter::WriteAttribute(device, endpointIds, clusterIds, attributeIds, value, - timedInteractionTimeoutMs, suppressResponse, optionalDataVersions); + InteractionModelWriter::ResetOptions(); + InteractionModelWriter::SetTimedInteractionTimeoutMs(timedInteractionTimeoutMs); + InteractionModelWriter::SetSuppressResponse(suppressResponse); + InteractionModelWriter::SetDataVersions(optionalDataVersions); + + return InteractionModelWriter::WriteAttribute(device, endpointIds, clusterIds, attributeIds, value); } template @@ -409,8 +601,11 @@ class InteractionModel : public InteractionModelReports, chip::DeviceProxy * device = GetDevice(identity); VerifyOrReturnError(device != nullptr, CHIP_ERROR_INCORRECT_STATE); - return InteractionModelCommands::SendCommand(device, endpointId, clusterId, commandId, value, timedInteractionTimeoutMs, - suppressResponse); + InteractionModelCommands::ResetOptions(); + InteractionModelCommands::SetTimedInteractionTimeoutMs(timedInteractionTimeoutMs); + InteractionModelCommands::SetSuppressResponse(suppressResponse); + + return InteractionModelCommands::SendCommand(device, endpointId, clusterId, commandId, value); } template diff --git a/src/app/util/ClientMonitoringRegistrationTable.cpp b/src/app/util/ClientMonitoringRegistrationTable.cpp index efdccf01467d1e..59ff417aefb363 100644 --- a/src/app/util/ClientMonitoringRegistrationTable.cpp +++ b/src/app/util/ClientMonitoringRegistrationTable.cpp @@ -17,59 +17,53 @@ #include "ClientMonitoringRegistrationTable.h" -namespace chip { +#include -/********************************************************** - * Attributes Definition - *********************************************************/ +namespace chip { /********************************************************** * ClientMonitoringRegistrationTable Implementation *********************************************************/ -ClientMonitoringRegistrationTable::ClientMonitoringRegistrationTable(FabricIndex fabricIndex) -{ - this->LoadFromStorage(fabricIndex); -} +ClientMonitoringRegistrationTable::ClientMonitoringRegistrationTable(PersistentStorageDelegate & storage) : mStorage(storage) {} -void ClientMonitoringRegistrationTable::LoadFromStorage(FabricIndex fabricIndex) +CHIP_ERROR ClientMonitoringRegistrationTable::LoadFromStorage(FabricIndex fabricIndex) { - // TODO: Implement load from NVM logic -} + uint8_t buffer[kRegStorageSize] = { 0 }; + uint16_t size = sizeof(buffer); -void ClientMonitoringRegistrationTable::SaveToStorage() -{ - // Store to NVM based of class attributes -} + ReturnErrorOnFailure( + mStorage.SyncGetKeyValue(DefaultStorageKeyAllocator::ClientMonitoringTableEntry(fabricIndex).KeyName(), buffer, size)); -NodeId ClientMonitoringRegistrationTable::getClientNodeId() -{ - return mRegisteredClient.clientNodeId; -} + TLV::TLVReader reader; + reader.Init(buffer, size); + ReturnErrorOnFailure(reader.Next(TLV::kTLVType_Structure, TLV::AnonymousTag())); -uint64_t ClientMonitoringRegistrationTable::getICid() -{ - return mRegisteredClient.ICid; -} + ReturnErrorOnFailure(mRegisteredClient.Decode(reader)); -FabricIndex ClientMonitoringRegistrationTable::getFaricIndex() -{ - return mRegisteredClient.fabricIndex; -} + mRegisteredClient.fabricIndex = fabricIndex; -void ClientMonitoringRegistrationTable::setClientNodeId(NodeId clientNodeId) -{ - mRegisteredClient.clientNodeId = clientNodeId; + return CHIP_NO_ERROR; } -void ClientMonitoringRegistrationTable::setICid(uint64_t ICid) +CHIP_ERROR ClientMonitoringRegistrationTable::SaveToStorage() { - mRegisteredClient.ICid = ICid; + 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())); } -void ClientMonitoringRegistrationTable::setFabricIndex(FabricIndex fabric) +ClientMonitoringRegistrationTable::ClientRegistrationEntry & ClientMonitoringRegistrationTable::GetClientRegistrationEntry() { - mRegisteredClient.fabricIndex = fabric; + return mRegisteredClient; } } // namespace chip diff --git a/src/app/util/ClientMonitoringRegistrationTable.h b/src/app/util/ClientMonitoringRegistrationTable.h index a495f96ba0bc58..7579cdc016cee8 100644 --- a/src/app/util/ClientMonitoringRegistrationTable.h +++ b/src/app/util/ClientMonitoringRegistrationTable.h @@ -19,33 +19,62 @@ #include #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. + */ class ClientMonitoringRegistrationTable { public: using MonitoringRegistrationStruct = chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::Type; - ClientMonitoringRegistrationTable(FabricIndex fabricIndex); + struct ClientRegistrationEntry : MonitoringRegistrationStruct + { + bool IsValid() { return clientNodeId != kUndefinedNodeId && ICid != kInvalidIcId && fabricIndex != kUndefinedFabricIndex; } + }; + + ClientMonitoringRegistrationTable(PersistentStorageDelegate & storage); ~ClientMonitoringRegistrationTable(){}; - void SaveToStorage(); + /** + * @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(); - // Getter - NodeId getClientNodeId(); - uint64_t getICid(); - FabricIndex getFaricIndex(); + /** + * @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); - // Setter - void setClientNodeId(NodeId clientNodeId); - void setICid(uint64_t ICid); - void setFabricIndex(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: - void LoadFromStorage(FabricIndex fabricIndex); - MonitoringRegistrationStruct mRegisteredClient; + static constexpr uint8_t kRegStorageSize = TLV::EstimateStructOverhead(sizeof(NodeId), sizeof(uint64_t)); + + ClientRegistrationEntry mRegisteredClient; + PersistentStorageDelegate & mStorage; }; } // namespace chip diff --git a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml index e85f6c220f2c04..5d3c70d827409f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml @@ -17,16 +17,16 @@ limitations under the License. - + - + - + @@ -47,15 +47,15 @@ limitations under the License. - + - - + + - + @@ -72,14 +72,14 @@ limitations under the License. and enforce Access Control for the Node's endpoints and their associated cluster instances. - + ACL - + Extension @@ -106,7 +106,7 @@ limitations under the License. - + @@ -114,7 +114,7 @@ limitations under the License. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml index 9cdf878619eab0..f14d6df8f6940f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml +++ b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml @@ -46,40 +46,40 @@ limitations under the License. true Determine availability of a new Software Image - - - - - - - - + + + + + + + + Response to QueryImage command - - - - - - - - + + + + + + + + Determine next action to take for a downloaded Software Image - - + + Reponse to ApplyUpdateRequest command - - + + Notify OTA Provider that an update was applied - - + + @@ -121,17 +121,17 @@ limitations under the License. OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER true true - DefaultOtaProviders + DefaultOTAProviders UpdatePossible UpdateState UpdateStateProgress - + Announce the presence of an OTA Provider - - - - - + + + + + This event SHALL be generated when a change of the UpdateState attribute occurs due to an OTA Requestor moving through the states necessary to query for updates. diff --git a/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml index 41cf218dd60e2d..c2393f383730b3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml @@ -19,8 +19,8 @@ limitations under the License. - - + + diff --git a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml index 4f78d129129b51..cde1addf326305 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml @@ -18,7 +18,7 @@ limitations under the License. - + @@ -53,26 +53,26 @@ limitations under the License. Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock - - + + Success/failure response for ArmFailSafe command - - + + Set the regulatory configuration to be used during commissioning - - + + Success/failure response for SetRegulatoryConfig command - - + + Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. @@ -80,8 +80,8 @@ limitations under the License. Indicates to client whether CommissioningComplete command succeeded - - + + diff --git a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml index e8cd3ce0bb6410..7ef1790f37f1d8 100644 --- a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml @@ -79,7 +79,7 @@ limitations under the License. The OffWithEffect command allows devices to be turned off using enhanced ways of fading. - + diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml index 426594319af0ec..9878cb3b9ef041 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -97,34 +97,34 @@ limitations under the License. GROUPS_CLUSTER true true - + NameSupport Command description for AddGroup - - + + Command description for ViewGroup - + Command description for GetGroupMembership - + Command description for RemoveGroup - + @@ -137,38 +137,38 @@ limitations under the License. Command description for AddGroupIfIdentifying - - + + Command description for AddGroupResponse - - + + Command description for ViewGroupResponse - - - + + + Command description for GetGroupMembershipResponse - - + + Command description for RemoveGroupResponse - - + + diff --git a/src/ble/BLEEndPoint.h b/src/ble/BLEEndPoint.h index 7a50256ca064a4..dba18fc5b43511 100644 --- a/src/ble/BLEEndPoint.h +++ b/src/ble/BLEEndPoint.h @@ -28,12 +28,13 @@ #pragma once #include -#include #include #include + #if CHIP_ENABLE_CHIPOBLE_TEST #include +#include #endif namespace chip { diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 2b37fb7e7a054e..d3ce74301608c7 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -63,12 +63,12 @@ client cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -76,22 +76,22 @@ client cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -102,7 +102,7 @@ client cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -270,7 +270,7 @@ client cluster OnOff = 6 { readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; + OnOffEffectIdentifier effectIdentifier = 0; OnOffDelayedAllOffEffectVariant effectVariant = 1; } @@ -417,7 +417,7 @@ client cluster BinaryInputBasic = 15 { client cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -450,19 +450,13 @@ client cluster Binding = 30 { } client cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -470,9 +464,15 @@ client cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -484,7 +484,7 @@ client cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -493,7 +493,7 @@ client cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -501,12 +501,12 @@ client cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -752,8 +752,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -845,7 +845,7 @@ client cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; @@ -853,15 +853,15 @@ client cluster OtaSoftwareUpdateRequestor = 42 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + 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; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } client cluster LocalizationConfiguration = 43 { diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index ae5582ba161bfa..2f2bfda6bfb730 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -3191,7 +3191,7 @@ "enabled": 1, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -3243,7 +3243,7 @@ "enabled": 0, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index bed3ffda5f0c42..85c88c48eacf38 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -74,6 +74,7 @@ using namespace chip::Credentials; #define CDC_JNI_CALLBACK_LOCAL_REF_COUNT 256 static void * IOThreadMain(void * arg); +static CHIP_ERROR StopIOThread(); static CHIP_ERROR N2J_PaseVerifierParams(JNIEnv * env, jlong setupPincode, jbyteArray pakeVerifier, jobject & outParams); static CHIP_ERROR N2J_NetworkLocation(JNIEnv * env, jstring ipAddress, jint port, jint interfaceIndex, jobject & outLocation); static CHIP_ERROR GetChipPathIdValue(jobject chipPathId, uint32_t wildcardValue, uint32_t & outValue); @@ -147,14 +148,10 @@ void JNI_OnUnload(JavaVM * jvm, void * reserved) chip::DeviceLayer::StackLock lock; ChipLogProgress(Controller, "JNI_OnUnload() called"); - // If the IO thread has been started, shut it down and wait for it to exit. - if (sIOThread != PTHREAD_NULL) - { - chip::DeviceLayer::PlatformMgr().StopEventLoopTask(); - - chip::DeviceLayer::StackUnlock unlock; - pthread_join(sIOThread, NULL); - } + // If the IO thread has not been stopped yet, shut it down now. + // TODO(arkq): Maybe we should just assert here, as the IO thread + // should be stopped before the library is unloaded. + StopIOThread(); sJVM = NULL; @@ -1020,6 +1017,10 @@ JNI_METHOD(void, shutdownCommissioning) (JNIEnv * env, jobject self, jlong handle) { chip::DeviceLayer::StackLock lock; + + // Stop the IO thread, so that the controller can be safely shut down. + StopIOThread(); + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); wrapper->Controller()->Shutdown(); } @@ -1410,6 +1411,23 @@ void * IOThreadMain(void * arg) return NULL; } +// NOTE: This function SHALL be called with the stack lock held. +CHIP_ERROR StopIOThread() +{ + if (sIOThread != PTHREAD_NULL) + { + ChipLogProgress(Controller, "IO thread stopping"); + chip::DeviceLayer::StackUnlock unlock; + + chip::DeviceLayer::PlatformMgr().StopEventLoopTask(); + + pthread_join(sIOThread, NULL); + sIOThread = PTHREAD_NULL; + } + + return CHIP_NO_ERROR; +} + CHIP_ERROR N2J_PaseVerifierParams(JNIEnv * env, jlong setupPincode, jbyteArray paseVerifier, jobject & outParams) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index b497ca97384004..80499454d11ed1 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -1370,11 +1370,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - jobject newElement_0_type; - std::string newElement_0_typeClassName = "java/lang/Long"; - std::string newElement_0_typeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), entry_0.type, newElement_0_type); + jobject newElement_0_deviceType; + std::string newElement_0_deviceTypeClassName = "java/lang/Long"; + std::string newElement_0_deviceTypeCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceTypeClassName.c_str(), + newElement_0_deviceTypeCtorSignature.c_str(), + entry_0.deviceType, newElement_0_deviceType); jobject newElement_0_revision; std::string newElement_0_revisionClassName = "java/lang/Integer"; std::string newElement_0_revisionCtorSignature = "(I)V"; @@ -1398,7 +1399,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } - newElement_0 = env->NewObject(deviceTypeStructStructClass_1, deviceTypeStructStructCtor_1, newElement_0_type, + newElement_0 = env->NewObject(deviceTypeStructStructClass_1, deviceTypeStructStructCtor_1, newElement_0_deviceType, newElement_0_revision); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } @@ -1940,27 +1941,27 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), entry_0.fabricIndex, newElement_0_fabricIndex); - jclass accessControlEntryStructClass_1; + jclass accessControlEntryStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntry", - accessControlEntryStructClass_1); + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", + accessControlEntryStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntry"); + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); return nullptr; } - jmethodID accessControlEntryStructCtor_1 = env->GetMethodID( - accessControlEntryStructClass_1, "", + jmethodID accessControlEntryStructStructCtor_1 = env->GetMethodID( + accessControlEntryStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V"); - if (accessControlEntryStructCtor_1 == nullptr) + if (accessControlEntryStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntry constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); return nullptr; } - newElement_0 = - env->NewObject(accessControlEntryStructClass_1, accessControlEntryStructCtor_1, newElement_0_privilege, - newElement_0_authMode, newElement_0_subjects, newElement_0_targets, newElement_0_fabricIndex); + newElement_0 = env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, + newElement_0_privilege, newElement_0_authMode, newElement_0_subjects, + newElement_0_targets, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1993,24 +1994,25 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), entry_0.fabricIndex, newElement_0_fabricIndex); - jclass extensionEntryStructClass_1; + jclass accessControlExtensionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterExtensionEntry", extensionEntryStructClass_1); + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", + accessControlExtensionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterExtensionEntry"); + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); return nullptr; } - jmethodID extensionEntryStructCtor_1 = - env->GetMethodID(extensionEntryStructClass_1, "", "([BLjava/lang/Integer;)V"); - if (extensionEntryStructCtor_1 == nullptr) + jmethodID accessControlExtensionStructStructCtor_1 = + env->GetMethodID(accessControlExtensionStructStructClass_1, "", "([BLjava/lang/Integer;)V"); + if (accessControlExtensionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterExtensionEntry constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); return nullptr; } - newElement_0 = env->NewObject(extensionEntryStructClass_1, extensionEntryStructCtor_1, newElement_0_data, - newElement_0_fabricIndex); + newElement_0 = env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, + newElement_0_data, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2907,8 +2909,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR using namespace app::Clusters::OtaSoftwareUpdateRequestor; switch (aPath.mAttributeId) { - case Attributes::DefaultOtaProviders::Id: { - using TypeInfo = Attributes::DefaultOtaProviders::TypeInfo; + case Attributes::DefaultOTAProviders::Id: { + using TypeInfo = Attributes::DefaultOTAProviders::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 660ddda61e66a2..665312f6af6a13 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -316,8 +316,8 @@ typedef void (*CHIPOtaSoftwareUpdateProviderClusterFeatureMapAttributeCallbackTy typedef void (*CHIPOtaSoftwareUpdateProviderClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPOtaSoftwareUpdateRequestorClusterDefaultOtaProvidersAttributeCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo::DecodableType &); +typedef void (*CHIPOtaSoftwareUpdateRequestorClusterDefaultOTAProvidersAttributeCallbackType)( + void *, const chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo::DecodableType &); typedef void (*CHIPOtaSoftwareUpdateRequestorClusterUpdatePossibleAttributeCallbackType)( void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo::DecodableArgType); typedef void (*CHIPOtaSoftwareUpdateRequestorClusterUpdateStateAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index 265a5323c3877a..1b78fa5638cf10 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -1390,12 +1390,12 @@ JNI_METHOD(void, BasicInformationCluster, writeLocalConfigDisabledAttribute) onFailure.release(); } -JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, writeDefaultOtaProvidersAttribute) +JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, writeDefaultOTAProvidersAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; ListFreer listFreer; - using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; TypeInfo::Type cppValue; std::vector> cleanupByteArrays; diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 3b71620f1306cc..d8b949d64e8a8c 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -295,28 +295,28 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_latestValue_fabricIndexClassName.c_str(), value_latestValue_fabricIndexCtorSignature.c_str(), cppValue.latestValue.Value().fabricIndex, value_latestValue_fabricIndex); - jclass accessControlEntryStructClass_1; + jclass accessControlEntryStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntry", - accessControlEntryStructClass_1); + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", + accessControlEntryStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntry"); + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); return nullptr; } - jmethodID accessControlEntryStructCtor_1 = env->GetMethodID( - accessControlEntryStructClass_1, "", + jmethodID accessControlEntryStructStructCtor_1 = env->GetMethodID( + accessControlEntryStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V"); - if (accessControlEntryStructCtor_1 == nullptr) + if (accessControlEntryStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntry constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); return nullptr; } value_latestValue = - env->NewObject(accessControlEntryStructClass_1, accessControlEntryStructCtor_1, value_latestValue_privilege, - value_latestValue_authMode, value_latestValue_subjects, value_latestValue_targets, - value_latestValue_fabricIndex); + env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, + value_latestValue_privilege, value_latestValue_authMode, value_latestValue_subjects, + value_latestValue_targets, value_latestValue_fabricIndex); } jobject value_fabricIndex; @@ -338,7 +338,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jmethodID accessControlEntryChangedStructCtor = env->GetMethodID(accessControlEntryChangedStructClass, "", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Lchip/devicecontroller/" - "ChipStructs$AccessControlClusterAccessControlEntry;Ljava/lang/Integer;)V"); + "ChipStructs$AccessControlClusterAccessControlEntryStruct;Ljava/lang/Integer;)V"); if (accessControlEntryChangedStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$AccessControlClusterAccessControlEntryChangedEvent constructor"); @@ -414,24 +414,26 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_latestValue_fabricIndexClassName.c_str(), value_latestValue_fabricIndexCtorSignature.c_str(), cppValue.latestValue.Value().fabricIndex, value_latestValue_fabricIndex); - jclass extensionEntryStructClass_1; + jclass accessControlExtensionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterExtensionEntry", extensionEntryStructClass_1); + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", + accessControlExtensionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterExtensionEntry"); + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); return nullptr; } - jmethodID extensionEntryStructCtor_1 = - env->GetMethodID(extensionEntryStructClass_1, "", "([BLjava/lang/Integer;)V"); - if (extensionEntryStructCtor_1 == nullptr) + jmethodID accessControlExtensionStructStructCtor_1 = + env->GetMethodID(accessControlExtensionStructStructClass_1, "", "([BLjava/lang/Integer;)V"); + if (accessControlExtensionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterExtensionEntry constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); return nullptr; } - value_latestValue = env->NewObject(extensionEntryStructClass_1, extensionEntryStructCtor_1, value_latestValue_data, - value_latestValue_fabricIndex); + value_latestValue = + env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, + value_latestValue_data, value_latestValue_fabricIndex); } jobject value_fabricIndex; @@ -453,7 +455,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jmethodID accessControlExtensionChangedStructCtor = env->GetMethodID(accessControlExtensionChangedStructClass, "", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Lchip/devicecontroller/" - "ChipStructs$AccessControlClusterExtensionEntry;Ljava/lang/Integer;)V"); + "ChipStructs$AccessControlClusterAccessControlExtensionStruct;Ljava/lang/Integer;)V"); if (accessControlExtensionChangedStructCtor == nullptr) { ChipLogError(Zcl, diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 08eaadcb710a3d..a77e04584a2a7b 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -81,18 +81,18 @@ void CHIPGroupsClusterAddGroupResponseCallback::CallbackFn( &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 groupId; - std::string groupIdClassName = "java/lang/Integer"; - std::string groupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), - dataResponse.groupId, groupId); - - env->CallVoidMethod(javaCallbackRef, javaMethod, status, groupId); + 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 GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), + dataResponse.groupID, GroupID); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); } CHIPGroupsClusterViewGroupResponseCallback::CHIPGroupsClusterViewGroupResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -146,20 +146,20 @@ void CHIPGroupsClusterViewGroupResponseCallback::CallbackFn( "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject status; - std::string statusClassName = "java/lang/Integer"; - std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); - jobject groupId; - std::string groupIdClassName = "java/lang/Integer"; - std::string groupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), - dataResponse.groupId, groupId); - jobject groupName; - groupName = env->NewStringUTF(std::string(dataResponse.groupName.data(), dataResponse.groupName.size()).c_str()); - - env->CallVoidMethod(javaCallbackRef, javaMethod, status, groupId, groupName); + 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 GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), + dataResponse.groupID, GroupID); + jobject GroupName; + GroupName = env->NewStringUTF(std::string(dataResponse.groupName.data(), dataResponse.groupName.size()).c_str()); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, GroupName); } CHIPGroupsClusterGetGroupMembershipResponseCallback::CHIPGroupsClusterGetGroupMembershipResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -214,34 +214,34 @@ void CHIPGroupsClusterGetGroupMembershipResponseCallback::CallbackFn( &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject capacity; + jobject Capacity; if (dataResponse.capacity.IsNull()) { - capacity = nullptr; + Capacity = nullptr; } else { - std::string capacityClassName = "java/lang/Integer"; - std::string capacityCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(capacityClassName.c_str(), capacityCtorSignature.c_str(), - dataResponse.capacity.Value(), capacity); + std::string CapacityClassName = "java/lang/Integer"; + std::string CapacityCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(CapacityClassName.c_str(), CapacityCtorSignature.c_str(), + dataResponse.capacity.Value(), Capacity); } - jobject groupList; - chip::JniReferences::GetInstance().CreateArrayList(groupList); + jobject GroupList; + chip::JniReferences::GetInstance().CreateArrayList(GroupList); - auto iter_groupList_0 = dataResponse.groupList.begin(); - while (iter_groupList_0.Next()) + auto iter_GroupList_0 = dataResponse.groupList.begin(); + while (iter_GroupList_0.Next()) { - auto & entry_0 = iter_groupList_0.GetValue(); + auto & entry_0 = iter_GroupList_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(groupList, newElement_0); + chip::JniReferences::GetInstance().AddToList(GroupList, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, capacity, groupList); + env->CallVoidMethod(javaCallbackRef, javaMethod, Capacity, GroupList); } CHIPGroupsClusterRemoveGroupResponseCallback::CHIPGroupsClusterRemoveGroupResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -295,18 +295,18 @@ void CHIPGroupsClusterRemoveGroupResponseCallback::CallbackFn( &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 groupId; - std::string groupIdClassName = "java/lang/Integer"; - std::string groupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), - dataResponse.groupId, groupId); - - env->CallVoidMethod(javaCallbackRef, javaMethod, status, groupId); + 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 GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), + dataResponse.groupID, GroupID); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); } CHIPScenesClusterAddSceneResponseCallback::CHIPScenesClusterAddSceneResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -946,115 +946,115 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( &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(), - static_cast(dataResponse.status), status); - jobject delayedActionTime; + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + static_cast(dataResponse.status), Status); + jobject DelayedActionTime; if (!dataResponse.delayedActionTime.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, delayedActionTime); + chip::JniReferences::GetInstance().CreateOptional(nullptr, DelayedActionTime); } else { - jobject delayedActionTimeInsideOptional; - std::string delayedActionTimeInsideOptionalClassName = "java/lang/Long"; - std::string delayedActionTimeInsideOptionalCtorSignature = "(J)V"; + jobject DelayedActionTimeInsideOptional; + std::string DelayedActionTimeInsideOptionalClassName = "java/lang/Long"; + std::string DelayedActionTimeInsideOptionalCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject( - delayedActionTimeInsideOptionalClassName.c_str(), delayedActionTimeInsideOptionalCtorSignature.c_str(), - dataResponse.delayedActionTime.Value(), delayedActionTimeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(delayedActionTimeInsideOptional, delayedActionTime); + DelayedActionTimeInsideOptionalClassName.c_str(), DelayedActionTimeInsideOptionalCtorSignature.c_str(), + dataResponse.delayedActionTime.Value(), DelayedActionTimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(DelayedActionTimeInsideOptional, DelayedActionTime); } - jobject imageURI; + jobject ImageURI; if (!dataResponse.imageURI.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, imageURI); + chip::JniReferences::GetInstance().CreateOptional(nullptr, ImageURI); } else { - jobject imageURIInsideOptional; - imageURIInsideOptional = + jobject ImageURIInsideOptional; + ImageURIInsideOptional = env->NewStringUTF(std::string(dataResponse.imageURI.Value().data(), dataResponse.imageURI.Value().size()).c_str()); - chip::JniReferences::GetInstance().CreateOptional(imageURIInsideOptional, imageURI); + chip::JniReferences::GetInstance().CreateOptional(ImageURIInsideOptional, ImageURI); } - jobject softwareVersion; + jobject SoftwareVersion; if (!dataResponse.softwareVersion.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, softwareVersion); + chip::JniReferences::GetInstance().CreateOptional(nullptr, SoftwareVersion); } else { - jobject softwareVersionInsideOptional; - std::string softwareVersionInsideOptionalClassName = "java/lang/Long"; - std::string softwareVersionInsideOptionalCtorSignature = "(J)V"; + jobject SoftwareVersionInsideOptional; + std::string SoftwareVersionInsideOptionalClassName = "java/lang/Long"; + std::string SoftwareVersionInsideOptionalCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject( - softwareVersionInsideOptionalClassName.c_str(), softwareVersionInsideOptionalCtorSignature.c_str(), - dataResponse.softwareVersion.Value(), softwareVersionInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(softwareVersionInsideOptional, softwareVersion); + SoftwareVersionInsideOptionalClassName.c_str(), SoftwareVersionInsideOptionalCtorSignature.c_str(), + dataResponse.softwareVersion.Value(), SoftwareVersionInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(SoftwareVersionInsideOptional, SoftwareVersion); } - jobject softwareVersionString; + jobject SoftwareVersionString; if (!dataResponse.softwareVersionString.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, softwareVersionString); + chip::JniReferences::GetInstance().CreateOptional(nullptr, SoftwareVersionString); } else { - jobject softwareVersionStringInsideOptional; - softwareVersionStringInsideOptional = env->NewStringUTF( + jobject SoftwareVersionStringInsideOptional; + SoftwareVersionStringInsideOptional = env->NewStringUTF( std::string(dataResponse.softwareVersionString.Value().data(), dataResponse.softwareVersionString.Value().size()) .c_str()); - chip::JniReferences::GetInstance().CreateOptional(softwareVersionStringInsideOptional, softwareVersionString); + chip::JniReferences::GetInstance().CreateOptional(SoftwareVersionStringInsideOptional, SoftwareVersionString); } - jobject updateToken; + jobject UpdateToken; if (!dataResponse.updateToken.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, updateToken); + chip::JniReferences::GetInstance().CreateOptional(nullptr, UpdateToken); } else { - jobject updateTokenInsideOptional; - jbyteArray updateTokenInsideOptionalByteArray = + jobject UpdateTokenInsideOptional; + jbyteArray UpdateTokenInsideOptionalByteArray = env->NewByteArray(static_cast(dataResponse.updateToken.Value().size())); - env->SetByteArrayRegion(updateTokenInsideOptionalByteArray, 0, static_cast(dataResponse.updateToken.Value().size()), + env->SetByteArrayRegion(UpdateTokenInsideOptionalByteArray, 0, static_cast(dataResponse.updateToken.Value().size()), reinterpret_cast(dataResponse.updateToken.Value().data())); - updateTokenInsideOptional = updateTokenInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(updateTokenInsideOptional, updateToken); + UpdateTokenInsideOptional = UpdateTokenInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(UpdateTokenInsideOptional, UpdateToken); } - jobject userConsentNeeded; + jobject UserConsentNeeded; if (!dataResponse.userConsentNeeded.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, userConsentNeeded); + chip::JniReferences::GetInstance().CreateOptional(nullptr, UserConsentNeeded); } else { - jobject userConsentNeededInsideOptional; - std::string userConsentNeededInsideOptionalClassName = "java/lang/Boolean"; - std::string userConsentNeededInsideOptionalCtorSignature = "(Z)V"; + jobject UserConsentNeededInsideOptional; + std::string UserConsentNeededInsideOptionalClassName = "java/lang/Boolean"; + std::string UserConsentNeededInsideOptionalCtorSignature = "(Z)V"; chip::JniReferences::GetInstance().CreateBoxedObject( - userConsentNeededInsideOptionalClassName.c_str(), userConsentNeededInsideOptionalCtorSignature.c_str(), - dataResponse.userConsentNeeded.Value(), userConsentNeededInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(userConsentNeededInsideOptional, userConsentNeeded); + UserConsentNeededInsideOptionalClassName.c_str(), UserConsentNeededInsideOptionalCtorSignature.c_str(), + dataResponse.userConsentNeeded.Value(), UserConsentNeededInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(UserConsentNeededInsideOptional, UserConsentNeeded); } - jobject metadataForRequestor; + jobject MetadataForRequestor; if (!dataResponse.metadataForRequestor.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, metadataForRequestor); + chip::JniReferences::GetInstance().CreateOptional(nullptr, MetadataForRequestor); } else { - jobject metadataForRequestorInsideOptional; - jbyteArray metadataForRequestorInsideOptionalByteArray = + jobject MetadataForRequestorInsideOptional; + jbyteArray MetadataForRequestorInsideOptionalByteArray = env->NewByteArray(static_cast(dataResponse.metadataForRequestor.Value().size())); - env->SetByteArrayRegion(metadataForRequestorInsideOptionalByteArray, 0, + env->SetByteArrayRegion(MetadataForRequestorInsideOptionalByteArray, 0, static_cast(dataResponse.metadataForRequestor.Value().size()), reinterpret_cast(dataResponse.metadataForRequestor.Value().data())); - metadataForRequestorInsideOptional = metadataForRequestorInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(metadataForRequestorInsideOptional, metadataForRequestor); + MetadataForRequestorInsideOptional = MetadataForRequestorInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(MetadataForRequestorInsideOptional, MetadataForRequestor); } - env->CallVoidMethod(javaCallbackRef, javaMethod, status, delayedActionTime, imageURI, softwareVersion, softwareVersionString, - updateToken, userConsentNeeded, metadataForRequestor); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, DelayedActionTime, ImageURI, SoftwareVersion, SoftwareVersionString, + UpdateToken, UserConsentNeeded, MetadataForRequestor); } CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback( jobject javaCallback) : @@ -1111,19 +1111,19 @@ void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CallbackFn &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject action; - std::string actionClassName = "java/lang/Integer"; - std::string actionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(actionClassName.c_str(), actionCtorSignature.c_str(), - static_cast(dataResponse.action), action); - jobject delayedActionTime; - std::string delayedActionTimeClassName = "java/lang/Long"; - std::string delayedActionTimeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(delayedActionTimeClassName.c_str(), - delayedActionTimeCtorSignature.c_str(), - dataResponse.delayedActionTime, delayedActionTime); - - env->CallVoidMethod(javaCallbackRef, javaMethod, action, delayedActionTime); + jobject Action; + std::string ActionClassName = "java/lang/Integer"; + std::string ActionCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(ActionClassName.c_str(), ActionCtorSignature.c_str(), + static_cast(dataResponse.action), Action); + jobject DelayedActionTime; + std::string DelayedActionTimeClassName = "java/lang/Long"; + std::string DelayedActionTimeCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(DelayedActionTimeClassName.c_str(), + DelayedActionTimeCtorSignature.c_str(), + dataResponse.delayedActionTime, DelayedActionTime); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Action, DelayedActionTime); } CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CHIPGeneralCommissioningClusterArmFailSafeResponseCallback( jobject javaCallback) : @@ -1179,15 +1179,15 @@ void CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CallbackFn( &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject errorCode; - std::string errorCodeClassName = "java/lang/Integer"; - std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), - static_cast(dataResponse.errorCode), errorCode); - jobject debugText; - debugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); + jobject ErrorCode; + std::string ErrorCodeClassName = "java/lang/Integer"; + std::string ErrorCodeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), + static_cast(dataResponse.errorCode), ErrorCode); + jobject DebugText; + DebugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); - env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); + env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); } CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback:: CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback(jobject javaCallback) : @@ -1245,15 +1245,15 @@ void CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback::Callbac &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject errorCode; - std::string errorCodeClassName = "java/lang/Integer"; - std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), - static_cast(dataResponse.errorCode), errorCode); - jobject debugText; - debugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); + jobject ErrorCode; + std::string ErrorCodeClassName = "java/lang/Integer"; + std::string ErrorCodeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), + static_cast(dataResponse.errorCode), ErrorCode); + jobject DebugText; + DebugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); - env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); + env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); } CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback:: CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback(jobject javaCallback) : @@ -1311,15 +1311,15 @@ void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback::Callb &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject errorCode; - std::string errorCodeClassName = "java/lang/Integer"; - std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), - static_cast(dataResponse.errorCode), errorCode); - jobject debugText; - debugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); + jobject ErrorCode; + std::string ErrorCodeClassName = "java/lang/Integer"; + std::string ErrorCodeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), + static_cast(dataResponse.errorCode), ErrorCode); + jobject DebugText; + DebugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); - env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); + env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); } CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CHIPNetworkCommissioningClusterScanNetworksResponseCallback( jobject javaCallback) : diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 4e87497189d35b..ff4b34a235d11a 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -2735,11 +2735,12 @@ void CHIPDescriptorDeviceTypeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_type; - std::string newElement_0_typeClassName = "java/lang/Long"; - std::string newElement_0_typeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), entry_0.type, newElement_0_type); + jobject newElement_0_deviceType; + std::string newElement_0_deviceTypeClassName = "java/lang/Long"; + std::string newElement_0_deviceTypeCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceTypeClassName.c_str(), + newElement_0_deviceTypeCtorSignature.c_str(), + entry_0.deviceType, newElement_0_deviceType); jobject newElement_0_revision; std::string newElement_0_revisionClassName = "java/lang/Integer"; std::string newElement_0_revisionCtorSignature = "(I)V"; @@ -2763,8 +2764,8 @@ void CHIPDescriptorDeviceTypeListAttributeCallback::CallbackFn( return; } - newElement_0 = - env->NewObject(deviceTypeStructStructClass_1, deviceTypeStructStructCtor_1, newElement_0_type, newElement_0_revision); + newElement_0 = env->NewObject(deviceTypeStructStructClass_1, deviceTypeStructStructCtor_1, newElement_0_deviceType, + newElement_0_revision); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3583,8 +3584,8 @@ CHIPAccessControlAclAttributeCallback::~CHIPAccessControlAclAttributeCallback() void CHIPAccessControlAclAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & - list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3728,25 +3729,27 @@ void CHIPAccessControlAclAttributeCallback::CallbackFn( newElement_0_fabricIndexCtorSignature.c_str(), entry_0.fabricIndex, newElement_0_fabricIndex); - jclass accessControlEntryStructClass_1; + jclass accessControlEntryStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntry", accessControlEntryStructClass_1); + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", + accessControlEntryStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntry"); + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); return; } - jmethodID accessControlEntryStructCtor_1 = env->GetMethodID( - accessControlEntryStructClass_1, "", + jmethodID accessControlEntryStructStructCtor_1 = env->GetMethodID( + accessControlEntryStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V"); - if (accessControlEntryStructCtor_1 == nullptr) + if (accessControlEntryStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntry constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); return; } - newElement_0 = env->NewObject(accessControlEntryStructClass_1, accessControlEntryStructCtor_1, newElement_0_privilege, - newElement_0_authMode, newElement_0_subjects, newElement_0_targets, newElement_0_fabricIndex); + newElement_0 = + env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, newElement_0_privilege, + newElement_0_authMode, newElement_0_subjects, newElement_0_targets, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3784,7 +3787,8 @@ CHIPAccessControlExtensionAttributeCallback::~CHIPAccessControlExtensionAttribut void CHIPAccessControlExtensionAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3825,23 +3829,25 @@ void CHIPAccessControlExtensionAttributeCallback::CallbackFn( newElement_0_fabricIndexCtorSignature.c_str(), entry_0.fabricIndex, newElement_0_fabricIndex); - jclass extensionEntryStructClass_1; + jclass accessControlExtensionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterExtensionEntry", extensionEntryStructClass_1); + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", + accessControlExtensionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterExtensionEntry"); + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); return; } - jmethodID extensionEntryStructCtor_1 = env->GetMethodID(extensionEntryStructClass_1, "", "([BLjava/lang/Integer;)V"); - if (extensionEntryStructCtor_1 == nullptr) + jmethodID accessControlExtensionStructStructCtor_1 = + env->GetMethodID(accessControlExtensionStructStructClass_1, "", "([BLjava/lang/Integer;)V"); + if (accessControlExtensionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterExtensionEntry constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); return; } - newElement_0 = - env->NewObject(extensionEntryStructClass_1, extensionEntryStructCtor_1, newElement_0_data, newElement_0_fabricIndex); + newElement_0 = env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, + newElement_0_data, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -4847,9 +4853,9 @@ void CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback:: - CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback:: + CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -4866,8 +4872,8 @@ CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback:: } } -CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback:: - ~CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback() +CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback:: + ~CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4878,7 +4884,7 @@ CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback::CallbackFn( +void CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & list) @@ -4890,8 +4896,8 @@ void CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index aa4dc9c77396ae..7101e2a5f43d2a 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -1607,10 +1607,9 @@ class CHIPAccessControlAclAttributeCallback : public chip::Callback::Callback & - list); + static void CallbackFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & list); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( @@ -1640,10 +1639,9 @@ class CHIPAccessControlExtensionAttributeCallback } } - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list); + static void CallbackFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & list); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( @@ -2049,20 +2047,20 @@ class CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback bool keepAlive; }; -class CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback - : public chip::Callback::Callback +class CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback + : public chip::Callback::Callback { public: - CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback(); + ~CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback(); - static void maybeDestroy(CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback * callback) + static void maybeDestroy(CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } @@ -2072,7 +2070,7 @@ class CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( - reinterpret_cast(context)->javaCallbackRef); + reinterpret_cast(context)->javaCallbackRef); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); }; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 817a5bab1a9b20..caf489666d2783 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -341,25 +341,25 @@ public GroupsCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); - public void addGroup(AddGroupResponseCallback callback, Integer groupId, String groupName) { - addGroup(chipClusterPtr, callback, groupId, groupName, null); + public void addGroup(AddGroupResponseCallback callback, Integer groupID, String groupName) { + addGroup(chipClusterPtr, callback, groupID, groupName, null); } public void addGroup( AddGroupResponseCallback callback, - Integer groupId, + Integer groupID, String groupName, int timedInvokeTimeoutMs) { - addGroup(chipClusterPtr, callback, groupId, groupName, timedInvokeTimeoutMs); + addGroup(chipClusterPtr, callback, groupID, groupName, timedInvokeTimeoutMs); } - public void viewGroup(ViewGroupResponseCallback callback, Integer groupId) { - viewGroup(chipClusterPtr, callback, groupId, null); + public void viewGroup(ViewGroupResponseCallback callback, Integer groupID) { + viewGroup(chipClusterPtr, callback, groupID, null); } public void viewGroup( - ViewGroupResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { - viewGroup(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); + ViewGroupResponseCallback callback, Integer groupID, int timedInvokeTimeoutMs) { + viewGroup(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); } public void getGroupMembership( @@ -374,13 +374,13 @@ public void getGroupMembership( getGroupMembership(chipClusterPtr, callback, groupList, timedInvokeTimeoutMs); } - public void removeGroup(RemoveGroupResponseCallback callback, Integer groupId) { - removeGroup(chipClusterPtr, callback, groupId, null); + public void removeGroup(RemoveGroupResponseCallback callback, Integer groupID) { + removeGroup(chipClusterPtr, callback, groupID, null); } public void removeGroup( - RemoveGroupResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { - removeGroup(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); + RemoveGroupResponseCallback callback, Integer groupID, int timedInvokeTimeoutMs) { + removeGroup(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); } public void removeAllGroups(DefaultClusterCallback callback) { @@ -393,29 +393,29 @@ public void removeAllGroups(DefaultClusterCallback callback, int timedInvokeTime } public void addGroupIfIdentifying( - DefaultClusterCallback callback, Integer groupId, String groupName) { - addGroupIfIdentifying(chipClusterPtr, callback, groupId, groupName, null); + DefaultClusterCallback callback, Integer groupID, String groupName) { + addGroupIfIdentifying(chipClusterPtr, callback, groupID, groupName, null); } public void addGroupIfIdentifying( DefaultClusterCallback callback, - Integer groupId, + Integer groupID, String groupName, int timedInvokeTimeoutMs) { - addGroupIfIdentifying(chipClusterPtr, callback, groupId, groupName, timedInvokeTimeoutMs); + addGroupIfIdentifying(chipClusterPtr, callback, groupID, groupName, timedInvokeTimeoutMs); } private native void addGroup( long chipClusterPtr, AddGroupResponseCallback Callback, - Integer groupId, + Integer groupID, String groupName, @Nullable Integer timedInvokeTimeoutMs); private native void viewGroup( long chipClusterPtr, ViewGroupResponseCallback Callback, - Integer groupId, + Integer groupID, @Nullable Integer timedInvokeTimeoutMs); private native void getGroupMembership( @@ -427,7 +427,7 @@ private native void getGroupMembership( private native void removeGroup( long chipClusterPtr, RemoveGroupResponseCallback Callback, - Integer groupId, + Integer groupID, @Nullable Integer timedInvokeTimeoutMs); private native void removeAllGroups( @@ -438,18 +438,18 @@ private native void removeAllGroups( private native void addGroupIfIdentifying( long chipClusterPtr, DefaultClusterCallback Callback, - Integer groupId, + Integer groupID, String groupName, @Nullable Integer timedInvokeTimeoutMs); public interface AddGroupResponseCallback { - void onSuccess(Integer status, Integer groupId); + void onSuccess(Integer status, Integer groupID); void onError(Exception error); } public interface ViewGroupResponseCallback { - void onSuccess(Integer status, Integer groupId, String groupName); + void onSuccess(Integer status, Integer groupID, String groupName); void onError(Exception error); } @@ -461,7 +461,7 @@ public interface GetGroupMembershipResponseCallback { } public interface RemoveGroupResponseCallback { - void onSuccess(Integer status, Integer groupId); + void onSuccess(Integer status, Integer groupID); void onError(Exception error); } @@ -1039,16 +1039,17 @@ public void toggle(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { } public void offWithEffect( - DefaultClusterCallback callback, Integer effectId, Integer effectVariant) { - offWithEffect(chipClusterPtr, callback, effectId, effectVariant, null); + DefaultClusterCallback callback, Integer effectIdentifier, Integer effectVariant) { + offWithEffect(chipClusterPtr, callback, effectIdentifier, effectVariant, null); } public void offWithEffect( DefaultClusterCallback callback, - Integer effectId, + Integer effectIdentifier, Integer effectVariant, int timedInvokeTimeoutMs) { - offWithEffect(chipClusterPtr, callback, effectId, effectVariant, timedInvokeTimeoutMs); + offWithEffect( + chipClusterPtr, callback, effectIdentifier, effectVariant, timedInvokeTimeoutMs); } public void onWithRecallGlobalScene(DefaultClusterCallback callback) { @@ -1096,7 +1097,7 @@ private native void toggle( private native void offWithEffect( long chipClusterPtr, DefaultClusterCallback Callback, - Integer effectId, + Integer effectIdentifier, Integer effectVariant, @Nullable Integer timedInvokeTimeoutMs); @@ -2873,7 +2874,7 @@ public AccessControlCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AclAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -2881,7 +2882,7 @@ default void onSubscriptionEstablished() {} } public interface ExtensionAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -2918,13 +2919,13 @@ public void readAclAttribute(AclAttributeCallback callback) { public void writeAclAttribute( DefaultClusterCallback callback, - ArrayList value) { + ArrayList value) { writeAclAttribute(chipClusterPtr, callback, value, null); } public void writeAclAttribute( DefaultClusterCallback callback, - ArrayList value, + ArrayList value, int timedWriteTimeoutMs) { writeAclAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -2940,13 +2941,13 @@ public void readExtensionAttribute(ExtensionAttributeCallback callback) { public void writeExtensionAttribute( DefaultClusterCallback callback, - ArrayList value) { + ArrayList value) { writeExtensionAttribute(chipClusterPtr, callback, value, null); } public void writeExtensionAttribute( DefaultClusterCallback callback, - ArrayList value, + ArrayList value, int timedWriteTimeoutMs) { writeExtensionAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -3036,7 +3037,7 @@ public void subscribeClusterRevisionAttribute( private native void writeAclAttribute( long chipClusterPtr, DefaultClusterCallback callback, - ArrayList value, + ArrayList value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeAclAttribute( @@ -3048,7 +3049,7 @@ private native void readExtensionAttribute( private native void writeExtensionAttribute( long chipClusterPtr, DefaultClusterCallback callback, - ArrayList value, + ArrayList value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeExtensionAttribute( @@ -4065,8 +4066,8 @@ public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) { public void queryImage( QueryImageResponseCallback callback, - Integer vendorId, - Integer productId, + Integer vendorID, + Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, @@ -4076,8 +4077,8 @@ public void queryImage( queryImage( chipClusterPtr, callback, - vendorId, - productId, + vendorID, + productID, softwareVersion, protocolsSupported, hardwareVersion, @@ -4089,8 +4090,8 @@ public void queryImage( public void queryImage( QueryImageResponseCallback callback, - Integer vendorId, - Integer productId, + Integer vendorID, + Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, @@ -4101,8 +4102,8 @@ public void queryImage( queryImage( chipClusterPtr, callback, - vendorId, - productId, + vendorID, + productID, softwareVersion, protocolsSupported, hardwareVersion, @@ -4142,8 +4143,8 @@ public void notifyUpdateApplied( private native void queryImage( long chipClusterPtr, QueryImageResponseCallback Callback, - Integer vendorId, - Integer productId, + Integer vendorID, + Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, @@ -4253,54 +4254,54 @@ public OtaSoftwareUpdateRequestorCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); - public void announceOtaProvider( + public void announceOTAProvider( DefaultClusterCallback callback, - Long providerNodeId, - Integer vendorId, + Long providerNodeID, + Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint) { - announceOtaProvider( + announceOTAProvider( chipClusterPtr, callback, - providerNodeId, - vendorId, + providerNodeID, + vendorID, announcementReason, metadataForNode, endpoint, null); } - public void announceOtaProvider( + public void announceOTAProvider( DefaultClusterCallback callback, - Long providerNodeId, - Integer vendorId, + Long providerNodeID, + Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint, int timedInvokeTimeoutMs) { - announceOtaProvider( + announceOTAProvider( chipClusterPtr, callback, - providerNodeId, - vendorId, + providerNodeID, + vendorID, announcementReason, metadataForNode, endpoint, timedInvokeTimeoutMs); } - private native void announceOtaProvider( + private native void announceOTAProvider( long chipClusterPtr, DefaultClusterCallback Callback, - Long providerNodeId, - Integer vendorId, + Long providerNodeID, + Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint, @Nullable Integer timedInvokeTimeoutMs); - public interface DefaultOtaProvidersAttributeCallback { + public interface DefaultOTAProvidersAttributeCallback { void onSuccess(List valueList); void onError(Exception ex); @@ -4324,26 +4325,26 @@ public interface AttributeListAttributeCallback { default void onSubscriptionEstablished() {} } - public void readDefaultOtaProvidersAttribute(DefaultOtaProvidersAttributeCallback callback) { - readDefaultOtaProvidersAttribute(chipClusterPtr, callback); + public void readDefaultOTAProvidersAttribute(DefaultOTAProvidersAttributeCallback callback) { + readDefaultOTAProvidersAttribute(chipClusterPtr, callback); } - public void writeDefaultOtaProvidersAttribute( + public void writeDefaultOTAProvidersAttribute( DefaultClusterCallback callback, ArrayList value) { - writeDefaultOtaProvidersAttribute(chipClusterPtr, callback, value, null); + writeDefaultOTAProvidersAttribute(chipClusterPtr, callback, value, null); } - public void writeDefaultOtaProvidersAttribute( + public void writeDefaultOTAProvidersAttribute( DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - writeDefaultOtaProvidersAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + writeDefaultOTAProvidersAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } - public void subscribeDefaultOtaProvidersAttribute( - DefaultOtaProvidersAttributeCallback callback, int minInterval, int maxInterval) { - subscribeDefaultOtaProvidersAttribute(chipClusterPtr, callback, minInterval, maxInterval); + public void subscribeDefaultOTAProvidersAttribute( + DefaultOTAProvidersAttributeCallback callback, int minInterval, int maxInterval) { + subscribeDefaultOTAProvidersAttribute(chipClusterPtr, callback, minInterval, maxInterval); } public void readUpdatePossibleAttribute(BooleanAttributeCallback callback) { @@ -4400,18 +4401,18 @@ public void subscribeClusterRevisionAttribute( subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - private native void readDefaultOtaProvidersAttribute( - long chipClusterPtr, DefaultOtaProvidersAttributeCallback callback); + private native void readDefaultOTAProvidersAttribute( + long chipClusterPtr, DefaultOTAProvidersAttributeCallback callback); - private native void writeDefaultOtaProvidersAttribute( + private native void writeDefaultOTAProvidersAttribute( long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeDefaultOtaProvidersAttribute( + private native void subscribeDefaultOTAProvidersAttribute( long chipClusterPtr, - DefaultOtaProvidersAttributeCallback callback, + DefaultOTAProvidersAttributeCallback callback, int minInterval, int maxInterval); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java index e9c60d7c72cd17..fe77f3667f8c89 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java @@ -28,14 +28,14 @@ public static class AccessControlClusterAccessControlEntryChangedEvent { public @Nullable Long adminNodeID; public @Nullable Integer adminPasscodeID; public Integer changeType; - public @Nullable ChipStructs.AccessControlClusterAccessControlEntry latestValue; + public @Nullable ChipStructs.AccessControlClusterAccessControlEntryStruct latestValue; public Integer fabricIndex; public AccessControlClusterAccessControlEntryChangedEvent( @Nullable Long adminNodeID, @Nullable Integer adminPasscodeID, Integer changeType, - @Nullable ChipStructs.AccessControlClusterAccessControlEntry latestValue, + @Nullable ChipStructs.AccessControlClusterAccessControlEntryStruct latestValue, Integer fabricIndex) { this.adminNodeID = adminNodeID; this.adminPasscodeID = adminPasscodeID; @@ -72,14 +72,14 @@ public static class AccessControlClusterAccessControlExtensionChangedEvent { public @Nullable Long adminNodeID; public @Nullable Integer adminPasscodeID; public Integer changeType; - public @Nullable ChipStructs.AccessControlClusterExtensionEntry latestValue; + public @Nullable ChipStructs.AccessControlClusterAccessControlExtensionStruct latestValue; public Integer fabricIndex; public AccessControlClusterAccessControlExtensionChangedEvent( @Nullable Long adminNodeID, @Nullable Integer adminPasscodeID, Integer changeType, - @Nullable ChipStructs.AccessControlClusterExtensionEntry latestValue, + @Nullable ChipStructs.AccessControlClusterAccessControlExtensionStruct latestValue, Integer fabricIndex) { this.adminNodeID = adminNodeID; this.adminPasscodeID = adminPasscodeID; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index 8538488775242f..0bcad38c702c69 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -653,7 +653,7 @@ public static String attributeIdToName(long clusterId, long attributeId) { } if (clusterId == 42L) { if (attributeId == 0L) { - return "DefaultOtaProviders"; + return "DefaultOTAProviders"; } if (attributeId == 1L) { return "UpdatePossible"; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index 5c721f652b3e45..e7ef6914462dfe 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -75,11 +75,11 @@ public String toString() { } public static class DescriptorClusterDeviceTypeStruct { - public Long type; + public Long deviceType; public Integer revision; - public DescriptorClusterDeviceTypeStruct(Long type, Integer revision) { - this.type = type; + public DescriptorClusterDeviceTypeStruct(Long deviceType, Integer revision) { + this.deviceType = deviceType; this.revision = revision; } @@ -87,8 +87,8 @@ public DescriptorClusterDeviceTypeStruct(Long type, Integer revision) { public String toString() { StringBuilder output = new StringBuilder(); output.append("DescriptorClusterDeviceTypeStruct {\n"); - output.append("\ttype: "); - output.append(type); + output.append("\tdeviceType: "); + output.append(deviceType); output.append("\n"); output.append("\trevision: "); output.append(revision); @@ -172,14 +172,14 @@ public String toString() { } } - public static class AccessControlClusterAccessControlEntry { + public static class AccessControlClusterAccessControlEntryStruct { public Integer privilege; public Integer authMode; public @Nullable ArrayList subjects; public @Nullable ArrayList targets; public Integer fabricIndex; - public AccessControlClusterAccessControlEntry( + public AccessControlClusterAccessControlEntryStruct( Integer privilege, Integer authMode, @Nullable ArrayList subjects, @@ -195,7 +195,7 @@ public AccessControlClusterAccessControlEntry( @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("AccessControlClusterAccessControlEntry {\n"); + output.append("AccessControlClusterAccessControlEntryStruct {\n"); output.append("\tprivilege: "); output.append(privilege); output.append("\n"); @@ -216,11 +216,11 @@ public String toString() { } } - public static class AccessControlClusterExtensionEntry { + public static class AccessControlClusterAccessControlExtensionStruct { public byte[] data; public Integer fabricIndex; - public AccessControlClusterExtensionEntry(byte[] data, Integer fabricIndex) { + public AccessControlClusterAccessControlExtensionStruct(byte[] data, Integer fabricIndex) { this.data = data; this.fabricIndex = fabricIndex; } @@ -228,7 +228,7 @@ public AccessControlClusterExtensionEntry(byte[] data, Integer fabricIndex) { @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("AccessControlClusterExtensionEntry {\n"); + output.append("AccessControlClusterAccessControlExtensionStruct {\n"); output.append("\tdata: "); output.append(Arrays.toString(data)); output.append("\n"); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index c3a06e9b6813c4..19c2f02ba4c287 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -304,12 +304,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer groupId) { + public void onSuccess(Integer Status, Integer GroupID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); - responseValues.put(groupIdResponseValue, groupId); + CommandResponseInfo StatusResponseValue = new CommandResponseInfo("Status", "Integer"); + responseValues.put(StatusResponseValue, Status); + CommandResponseInfo GroupIDResponseValue = new CommandResponseInfo("GroupID", "Integer"); + responseValues.put(GroupIDResponseValue, GroupID); callback.onSuccess(responseValues); } @@ -329,14 +329,14 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer groupId, String groupName) { + public void onSuccess(Integer Status, Integer GroupID, String GroupName) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); - responseValues.put(groupIdResponseValue, groupId); - CommandResponseInfo groupNameResponseValue = new CommandResponseInfo("groupName", "String"); - responseValues.put(groupNameResponseValue, groupName); + CommandResponseInfo StatusResponseValue = new CommandResponseInfo("Status", "Integer"); + responseValues.put(StatusResponseValue, Status); + CommandResponseInfo GroupIDResponseValue = new CommandResponseInfo("GroupID", "Integer"); + responseValues.put(GroupIDResponseValue, GroupID); + CommandResponseInfo GroupNameResponseValue = new CommandResponseInfo("GroupName", "String"); + responseValues.put(GroupNameResponseValue, GroupName); callback.onSuccess(responseValues); } @@ -357,11 +357,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer capacity, ArrayList groupList) { + public void onSuccess(@Nullable Integer Capacity, ArrayList GroupList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo capacityResponseValue = new CommandResponseInfo("capacity", "Integer"); - responseValues.put(capacityResponseValue, capacity); - // groupList: /* TYPE WARNING: array array defaults to */ uint8_t * + CommandResponseInfo CapacityResponseValue = new CommandResponseInfo("Capacity", "Integer"); + responseValues.put(CapacityResponseValue, Capacity); + // GroupList: /* TYPE WARNING: array array defaults to */ uint8_t * // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); } @@ -382,12 +382,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer groupId) { + public void onSuccess(Integer Status, Integer GroupID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); - responseValues.put(groupIdResponseValue, groupId); + CommandResponseInfo StatusResponseValue = new CommandResponseInfo("Status", "Integer"); + responseValues.put(StatusResponseValue, Status); + CommandResponseInfo GroupIDResponseValue = new CommandResponseInfo("GroupID", "Integer"); + responseValues.put(GroupIDResponseValue, GroupID); callback.onSuccess(responseValues); } @@ -1288,11 +1288,12 @@ 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"); + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1314,11 +1315,12 @@ 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"); + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1607,38 +1609,38 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( - Integer status, - Optional delayedActionTime, - Optional imageURI, - Optional softwareVersion, - Optional softwareVersionString, - Optional updateToken, - Optional userConsentNeeded, - Optional metadataForRequestor) { + Integer Status, + Optional DelayedActionTime, + Optional ImageURI, + Optional SoftwareVersion, + Optional SoftwareVersionString, + Optional UpdateToken, + Optional UserConsentNeeded, + Optional MetadataForRequestor) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo delayedActionTimeResponseValue = - new CommandResponseInfo("delayedActionTime", "Optional"); - responseValues.put(delayedActionTimeResponseValue, delayedActionTime); - CommandResponseInfo imageURIResponseValue = - new CommandResponseInfo("imageURI", "Optional"); - responseValues.put(imageURIResponseValue, imageURI); - CommandResponseInfo softwareVersionResponseValue = - new CommandResponseInfo("softwareVersion", "Optional"); - responseValues.put(softwareVersionResponseValue, softwareVersion); - CommandResponseInfo softwareVersionStringResponseValue = - new CommandResponseInfo("softwareVersionString", "Optional"); - responseValues.put(softwareVersionStringResponseValue, softwareVersionString); - CommandResponseInfo updateTokenResponseValue = - new CommandResponseInfo("updateToken", "Optional"); - responseValues.put(updateTokenResponseValue, updateToken); - CommandResponseInfo userConsentNeededResponseValue = - new CommandResponseInfo("userConsentNeeded", "Optional"); - responseValues.put(userConsentNeededResponseValue, userConsentNeeded); - CommandResponseInfo metadataForRequestorResponseValue = - new CommandResponseInfo("metadataForRequestor", "Optional"); - responseValues.put(metadataForRequestorResponseValue, metadataForRequestor); + CommandResponseInfo StatusResponseValue = new CommandResponseInfo("Status", "Integer"); + responseValues.put(StatusResponseValue, Status); + CommandResponseInfo DelayedActionTimeResponseValue = + new CommandResponseInfo("DelayedActionTime", "Optional"); + responseValues.put(DelayedActionTimeResponseValue, DelayedActionTime); + CommandResponseInfo ImageURIResponseValue = + new CommandResponseInfo("ImageURI", "Optional"); + responseValues.put(ImageURIResponseValue, ImageURI); + CommandResponseInfo SoftwareVersionResponseValue = + new CommandResponseInfo("SoftwareVersion", "Optional"); + responseValues.put(SoftwareVersionResponseValue, SoftwareVersion); + CommandResponseInfo SoftwareVersionStringResponseValue = + new CommandResponseInfo("SoftwareVersionString", "Optional"); + responseValues.put(SoftwareVersionStringResponseValue, SoftwareVersionString); + CommandResponseInfo UpdateTokenResponseValue = + new CommandResponseInfo("UpdateToken", "Optional"); + responseValues.put(UpdateTokenResponseValue, UpdateToken); + CommandResponseInfo UserConsentNeededResponseValue = + new CommandResponseInfo("UserConsentNeeded", "Optional"); + responseValues.put(UserConsentNeededResponseValue, UserConsentNeeded); + CommandResponseInfo MetadataForRequestorResponseValue = + new CommandResponseInfo("MetadataForRequestor", "Optional"); + responseValues.put(MetadataForRequestorResponseValue, MetadataForRequestor); callback.onSuccess(responseValues); } @@ -1659,13 +1661,13 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer action, Long delayedActionTime) { + public void onSuccess(Integer Action, Long DelayedActionTime) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo actionResponseValue = new CommandResponseInfo("action", "Integer"); - responseValues.put(actionResponseValue, action); - CommandResponseInfo delayedActionTimeResponseValue = - new CommandResponseInfo("delayedActionTime", "Long"); - responseValues.put(delayedActionTimeResponseValue, delayedActionTime); + CommandResponseInfo ActionResponseValue = new CommandResponseInfo("Action", "Integer"); + responseValues.put(ActionResponseValue, Action); + CommandResponseInfo DelayedActionTimeResponseValue = + new CommandResponseInfo("DelayedActionTime", "Long"); + responseValues.put(DelayedActionTimeResponseValue, DelayedActionTime); callback.onSuccess(responseValues); } @@ -1699,9 +1701,9 @@ public void onError(Exception ex) { } } - public static class DelegatedOtaSoftwareUpdateRequestorClusterDefaultOtaProvidersAttributeCallback + public static class DelegatedOtaSoftwareUpdateRequestorClusterDefaultOTAProvidersAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster - .DefaultOtaProvidersAttributeCallback, + .DefaultOTAProvidersAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2177,12 +2179,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer errorCode, String debugText) { + public void onSuccess(Integer ErrorCode, String DebugText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); - responseValues.put(errorCodeResponseValue, errorCode); - CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); - responseValues.put(debugTextResponseValue, debugText); + CommandResponseInfo ErrorCodeResponseValue = new CommandResponseInfo("ErrorCode", "Integer"); + responseValues.put(ErrorCodeResponseValue, ErrorCode); + CommandResponseInfo DebugTextResponseValue = new CommandResponseInfo("DebugText", "String"); + responseValues.put(DebugTextResponseValue, DebugText); callback.onSuccess(responseValues); } @@ -2203,12 +2205,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer errorCode, String debugText) { + public void onSuccess(Integer ErrorCode, String DebugText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); - responseValues.put(errorCodeResponseValue, errorCode); - CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); - responseValues.put(debugTextResponseValue, debugText); + CommandResponseInfo ErrorCodeResponseValue = new CommandResponseInfo("ErrorCode", "Integer"); + responseValues.put(ErrorCodeResponseValue, ErrorCode); + CommandResponseInfo DebugTextResponseValue = new CommandResponseInfo("DebugText", "String"); + responseValues.put(DebugTextResponseValue, DebugText); callback.onSuccess(responseValues); } @@ -2229,12 +2231,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer errorCode, String debugText) { + public void onSuccess(Integer ErrorCode, String DebugText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); - responseValues.put(errorCodeResponseValue, errorCode); - CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); - responseValues.put(debugTextResponseValue, debugText); + CommandResponseInfo ErrorCodeResponseValue = new CommandResponseInfo("ErrorCode", "Integer"); + responseValues.put(ErrorCodeResponseValue, ErrorCode); + CommandResponseInfo DebugTextResponseValue = new CommandResponseInfo("DebugText", "String"); + responseValues.put(DebugTextResponseValue, DebugText); callback.onSuccess(responseValues); } @@ -7616,9 +7618,9 @@ public Map> getCommandMap() { Map groupsClusterInteractionInfoMap = new LinkedHashMap<>(); Map groupsaddGroupCommandParams = new LinkedHashMap(); - CommandParameterInfo groupsaddGroupgroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", Integer.class, Integer.class); - groupsaddGroupCommandParams.put("groupId", groupsaddGroupgroupIdCommandParameterInfo); + CommandParameterInfo groupsaddGroupgroupIDCommandParameterInfo = + new CommandParameterInfo("groupID", Integer.class, Integer.class); + groupsaddGroupCommandParams.put("groupID", groupsaddGroupgroupIDCommandParameterInfo); CommandParameterInfo groupsaddGroupgroupNameCommandParameterInfo = new CommandParameterInfo("groupName", String.class, String.class); @@ -7630,7 +7632,7 @@ public Map> getCommandMap() { ((ChipClusters.GroupsCluster) cluster) .addGroup( (ChipClusters.GroupsCluster.AddGroupResponseCallback) callback, - (Integer) commandArguments.get("groupId"), + (Integer) commandArguments.get("groupID"), (String) commandArguments.get("groupName")); }, () -> new DelegatedAddGroupResponseCallback(), @@ -7638,9 +7640,9 @@ public Map> getCommandMap() { groupsClusterInteractionInfoMap.put("addGroup", groupsaddGroupInteractionInfo); Map groupsviewGroupCommandParams = new LinkedHashMap(); - CommandParameterInfo groupsviewGroupgroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", Integer.class, Integer.class); - groupsviewGroupCommandParams.put("groupId", groupsviewGroupgroupIdCommandParameterInfo); + CommandParameterInfo groupsviewGroupgroupIDCommandParameterInfo = + new CommandParameterInfo("groupID", Integer.class, Integer.class); + groupsviewGroupCommandParams.put("groupID", groupsviewGroupgroupIDCommandParameterInfo); InteractionInfo groupsviewGroupInteractionInfo = new InteractionInfo( @@ -7648,7 +7650,7 @@ public Map> getCommandMap() { ((ChipClusters.GroupsCluster) cluster) .viewGroup( (ChipClusters.GroupsCluster.ViewGroupResponseCallback) callback, - (Integer) commandArguments.get("groupId")); + (Integer) commandArguments.get("groupID")); }, () -> new DelegatedViewGroupResponseCallback(), groupsviewGroupCommandParams); @@ -7674,9 +7676,9 @@ public Map> getCommandMap() { "getGroupMembership", groupsgetGroupMembershipInteractionInfo); Map groupsremoveGroupCommandParams = new LinkedHashMap(); - CommandParameterInfo groupsremoveGroupgroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", Integer.class, Integer.class); - groupsremoveGroupCommandParams.put("groupId", groupsremoveGroupgroupIdCommandParameterInfo); + CommandParameterInfo groupsremoveGroupgroupIDCommandParameterInfo = + new CommandParameterInfo("groupID", Integer.class, Integer.class); + groupsremoveGroupCommandParams.put("groupID", groupsremoveGroupgroupIDCommandParameterInfo); InteractionInfo groupsremoveGroupInteractionInfo = new InteractionInfo( @@ -7684,7 +7686,7 @@ public Map> getCommandMap() { ((ChipClusters.GroupsCluster) cluster) .removeGroup( (ChipClusters.GroupsCluster.RemoveGroupResponseCallback) callback, - (Integer) commandArguments.get("groupId")); + (Integer) commandArguments.get("groupID")); }, () -> new DelegatedRemoveGroupResponseCallback(), groupsremoveGroupCommandParams); @@ -7702,10 +7704,10 @@ public Map> getCommandMap() { groupsClusterInteractionInfoMap.put("removeAllGroups", groupsremoveAllGroupsInteractionInfo); Map groupsaddGroupIfIdentifyingCommandParams = new LinkedHashMap(); - CommandParameterInfo groupsaddGroupIfIdentifyinggroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", Integer.class, Integer.class); + CommandParameterInfo groupsaddGroupIfIdentifyinggroupIDCommandParameterInfo = + new CommandParameterInfo("groupID", Integer.class, Integer.class); groupsaddGroupIfIdentifyingCommandParams.put( - "groupId", groupsaddGroupIfIdentifyinggroupIdCommandParameterInfo); + "groupID", groupsaddGroupIfIdentifyinggroupIDCommandParameterInfo); CommandParameterInfo groupsaddGroupIfIdentifyinggroupNameCommandParameterInfo = new CommandParameterInfo("groupName", String.class, String.class); @@ -7718,7 +7720,7 @@ public Map> getCommandMap() { ((ChipClusters.GroupsCluster) cluster) .addGroupIfIdentifying( (DefaultClusterCallback) callback, - (Integer) commandArguments.get("groupId"), + (Integer) commandArguments.get("groupID"), (String) commandArguments.get("groupName")); }, () -> new DelegatedDefaultClusterCallback(), @@ -7927,9 +7929,10 @@ public Map> getCommandMap() { onOffClusterInteractionInfoMap.put("toggle", onOfftoggleInteractionInfo); Map onOffoffWithEffectCommandParams = new LinkedHashMap(); - CommandParameterInfo onOffoffWithEffecteffectIdCommandParameterInfo = - new CommandParameterInfo("effectId", Integer.class, Integer.class); - onOffoffWithEffectCommandParams.put("effectId", onOffoffWithEffecteffectIdCommandParameterInfo); + CommandParameterInfo onOffoffWithEffecteffectIdentifierCommandParameterInfo = + new CommandParameterInfo("effectIdentifier", Integer.class, Integer.class); + onOffoffWithEffectCommandParams.put( + "effectIdentifier", onOffoffWithEffecteffectIdentifierCommandParameterInfo); CommandParameterInfo onOffoffWithEffecteffectVariantCommandParameterInfo = new CommandParameterInfo("effectVariant", Integer.class, Integer.class); @@ -7942,7 +7945,7 @@ public Map> getCommandMap() { ((ChipClusters.OnOffCluster) cluster) .offWithEffect( (DefaultClusterCallback) callback, - (Integer) commandArguments.get("effectId"), + (Integer) commandArguments.get("effectIdentifier"), (Integer) commandArguments.get("effectVariant")); }, () -> new DelegatedDefaultClusterCallback(), @@ -8605,15 +8608,15 @@ public Map> getCommandMap() { new LinkedHashMap<>(); Map otaSoftwareUpdateProviderqueryImageCommandParams = new LinkedHashMap(); - CommandParameterInfo otaSoftwareUpdateProviderqueryImagevendorIdCommandParameterInfo = - new CommandParameterInfo("vendorId", Integer.class, Integer.class); + CommandParameterInfo otaSoftwareUpdateProviderqueryImagevendorIDCommandParameterInfo = + new CommandParameterInfo("vendorID", Integer.class, Integer.class); otaSoftwareUpdateProviderqueryImageCommandParams.put( - "vendorId", otaSoftwareUpdateProviderqueryImagevendorIdCommandParameterInfo); + "vendorID", otaSoftwareUpdateProviderqueryImagevendorIDCommandParameterInfo); - CommandParameterInfo otaSoftwareUpdateProviderqueryImageproductIdCommandParameterInfo = - new CommandParameterInfo("productId", Integer.class, Integer.class); + CommandParameterInfo otaSoftwareUpdateProviderqueryImageproductIDCommandParameterInfo = + new CommandParameterInfo("productID", Integer.class, Integer.class); otaSoftwareUpdateProviderqueryImageCommandParams.put( - "productId", otaSoftwareUpdateProviderqueryImageproductIdCommandParameterInfo); + "productID", otaSoftwareUpdateProviderqueryImageproductIDCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateProviderqueryImagesoftwareVersionCommandParameterInfo = new CommandParameterInfo("softwareVersion", Long.class, Long.class); @@ -8657,8 +8660,8 @@ public Map> getCommandMap() { .queryImage( (ChipClusters.OtaSoftwareUpdateProviderCluster.QueryImageResponseCallback) callback, - (Integer) commandArguments.get("vendorId"), - (Integer) commandArguments.get("productId"), + (Integer) commandArguments.get("vendorID"), + (Integer) commandArguments.get("productID"), (Long) commandArguments.get("softwareVersion"), (ArrayList) commandArguments.get("protocolsSupported"), (Optional) commandArguments.get("hardwareVersion"), @@ -8728,55 +8731,55 @@ public Map> getCommandMap() { commandMap.put("otaSoftwareUpdateProvider", otaSoftwareUpdateProviderClusterInteractionInfoMap); Map otaSoftwareUpdateRequestorClusterInteractionInfoMap = new LinkedHashMap<>(); - Map otaSoftwareUpdateRequestorannounceOtaProviderCommandParams = + Map otaSoftwareUpdateRequestorannounceOTAProviderCommandParams = new LinkedHashMap(); CommandParameterInfo - otaSoftwareUpdateRequestorannounceOtaProviderproviderNodeIdCommandParameterInfo = - new CommandParameterInfo("providerNodeId", Long.class, Long.class); - otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put( - "providerNodeId", - otaSoftwareUpdateRequestorannounceOtaProviderproviderNodeIdCommandParameterInfo); + otaSoftwareUpdateRequestorannounceOTAProviderproviderNodeIDCommandParameterInfo = + new CommandParameterInfo("providerNodeID", Long.class, Long.class); + otaSoftwareUpdateRequestorannounceOTAProviderCommandParams.put( + "providerNodeID", + otaSoftwareUpdateRequestorannounceOTAProviderproviderNodeIDCommandParameterInfo); - CommandParameterInfo otaSoftwareUpdateRequestorannounceOtaProvidervendorIdCommandParameterInfo = - new CommandParameterInfo("vendorId", Integer.class, Integer.class); - otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put( - "vendorId", otaSoftwareUpdateRequestorannounceOtaProvidervendorIdCommandParameterInfo); + CommandParameterInfo otaSoftwareUpdateRequestorannounceOTAProvidervendorIDCommandParameterInfo = + new CommandParameterInfo("vendorID", Integer.class, Integer.class); + otaSoftwareUpdateRequestorannounceOTAProviderCommandParams.put( + "vendorID", otaSoftwareUpdateRequestorannounceOTAProvidervendorIDCommandParameterInfo); CommandParameterInfo - otaSoftwareUpdateRequestorannounceOtaProviderannouncementReasonCommandParameterInfo = + otaSoftwareUpdateRequestorannounceOTAProviderannouncementReasonCommandParameterInfo = new CommandParameterInfo("announcementReason", Integer.class, Integer.class); - otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put( + otaSoftwareUpdateRequestorannounceOTAProviderCommandParams.put( "announcementReason", - otaSoftwareUpdateRequestorannounceOtaProviderannouncementReasonCommandParameterInfo); + otaSoftwareUpdateRequestorannounceOTAProviderannouncementReasonCommandParameterInfo); CommandParameterInfo - otaSoftwareUpdateRequestorannounceOtaProvidermetadataForNodeCommandParameterInfo = + otaSoftwareUpdateRequestorannounceOTAProvidermetadataForNodeCommandParameterInfo = new CommandParameterInfo("metadataForNode", Optional.class, byte[].class); - otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put( + otaSoftwareUpdateRequestorannounceOTAProviderCommandParams.put( "metadataForNode", - otaSoftwareUpdateRequestorannounceOtaProvidermetadataForNodeCommandParameterInfo); + otaSoftwareUpdateRequestorannounceOTAProvidermetadataForNodeCommandParameterInfo); - CommandParameterInfo otaSoftwareUpdateRequestorannounceOtaProviderendpointCommandParameterInfo = + CommandParameterInfo otaSoftwareUpdateRequestorannounceOTAProviderendpointCommandParameterInfo = new CommandParameterInfo("endpoint", Integer.class, Integer.class); - otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put( - "endpoint", otaSoftwareUpdateRequestorannounceOtaProviderendpointCommandParameterInfo); + otaSoftwareUpdateRequestorannounceOTAProviderCommandParams.put( + "endpoint", otaSoftwareUpdateRequestorannounceOTAProviderendpointCommandParameterInfo); - InteractionInfo otaSoftwareUpdateRequestorannounceOtaProviderInteractionInfo = + InteractionInfo otaSoftwareUpdateRequestorannounceOTAProviderInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.OtaSoftwareUpdateRequestorCluster) cluster) - .announceOtaProvider( + .announceOTAProvider( (DefaultClusterCallback) callback, - (Long) commandArguments.get("providerNodeId"), - (Integer) commandArguments.get("vendorId"), + (Long) commandArguments.get("providerNodeID"), + (Integer) commandArguments.get("vendorID"), (Integer) commandArguments.get("announcementReason"), (Optional) commandArguments.get("metadataForNode"), (Integer) commandArguments.get("endpoint")); }, () -> new DelegatedDefaultClusterCallback(), - otaSoftwareUpdateRequestorannounceOtaProviderCommandParams); + otaSoftwareUpdateRequestorannounceOTAProviderCommandParams); otaSoftwareUpdateRequestorClusterInteractionInfoMap.put( - "announceOtaProvider", otaSoftwareUpdateRequestorannounceOtaProviderInteractionInfo); + "announceOTAProvider", otaSoftwareUpdateRequestorannounceOTAProviderInteractionInfo); commandMap.put( "otaSoftwareUpdateRequestor", otaSoftwareUpdateRequestorClusterInteractionInfoMap); Map localizationConfigurationClusterInteractionInfoMap = diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 679955f977665c..0a8c4151b11748 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -1763,24 +1763,24 @@ public Map> getReadAttributeMap() { Map readOtaSoftwareUpdateRequestorInteractionInfo = new LinkedHashMap<>(); Map - readOtaSoftwareUpdateRequestorDefaultOtaProvidersCommandParams = + readOtaSoftwareUpdateRequestorDefaultOTAProvidersCommandParams = new LinkedHashMap(); - InteractionInfo readOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeInteractionInfo = + InteractionInfo readOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.OtaSoftwareUpdateRequestorCluster) cluster) - .readDefaultOtaProvidersAttribute( + .readDefaultOTAProvidersAttribute( (ChipClusters.OtaSoftwareUpdateRequestorCluster - .DefaultOtaProvidersAttributeCallback) + .DefaultOTAProvidersAttributeCallback) callback); }, () -> new ClusterInfoMapping - .DelegatedOtaSoftwareUpdateRequestorClusterDefaultOtaProvidersAttributeCallback(), - readOtaSoftwareUpdateRequestorDefaultOtaProvidersCommandParams); + .DelegatedOtaSoftwareUpdateRequestorClusterDefaultOTAProvidersAttributeCallback(), + readOtaSoftwareUpdateRequestorDefaultOTAProvidersCommandParams); readOtaSoftwareUpdateRequestorInteractionInfo.put( - "readDefaultOtaProvidersAttribute", - readOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeInteractionInfo); + "readDefaultOTAProvidersAttribute", + readOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeInteractionInfo); Map readOtaSoftwareUpdateRequestorUpdatePossibleCommandParams = new LinkedHashMap(); InteractionInfo readOtaSoftwareUpdateRequestorUpdatePossibleAttributeInteractionInfo = diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index a0381f09618a5f..4f4c09cef32ad5 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -230,12 +230,10 @@ chip_python_wheel_action("chip-core") { "chip/utils/CommissioningBuildingBlocks.py", "chip/utils/__init__.py", "chip/yaml/__init__.py", - "chip/yaml/constraints.py", "chip/yaml/data_model_lookup.py", "chip/yaml/errors.py", "chip/yaml/format_converter.py", - "chip/yaml/parser.py", - "chip/yaml/variable_storage.py", + "chip/yaml/runner.py", ] if (chip_controller) { diff --git a/src/controller/python/chip/ChipStack.py b/src/controller/python/chip/ChipStack.py index 3ca313be08214d..fabf43e4110c5e 100644 --- a/src/controller/python/chip/ChipStack.py +++ b/src/controller/python/chip/ChipStack.py @@ -328,7 +328,10 @@ def setLogFunct(self, logFunct): self._ChipStackLib.pychip_Stack_SetLogFunct(logFunct) def Shutdown(self): - self.Call(lambda: self._ChipStackLib.pychip_DeviceController_StackShutdown()).raise_on_error() + # + # Terminate Matter thread and shutdown the stack. + # + self._ChipStackLib.pychip_DeviceController_StackShutdown() # # We only shutdown the persistent storage layer AFTER we've shut down the stack, diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 02541473780b1b..4698b39f7bd6f5 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -101,7 +101,7 @@ class ChipClusters: "commandId": 0x00000000, "commandName": "AddGroup", "args": { - "groupId": "int", + "groupID": "int", "groupName": "str", }, }, @@ -109,7 +109,7 @@ class ChipClusters: "commandId": 0x00000001, "commandName": "ViewGroup", "args": { - "groupId": "int", + "groupID": "int", }, }, 0x00000002: { @@ -123,7 +123,7 @@ class ChipClusters: "commandId": 0x00000003, "commandName": "RemoveGroup", "args": { - "groupId": "int", + "groupID": "int", }, }, 0x00000004: { @@ -136,7 +136,7 @@ class ChipClusters: "commandId": 0x00000005, "commandName": "AddGroupIfIdentifying", "args": { - "groupId": "int", + "groupID": "int", "groupName": "str", }, }, @@ -333,7 +333,7 @@ class ChipClusters: "commandId": 0x00000040, "commandName": "OffWithEffect", "args": { - "effectId": "int", + "effectIdentifier": "int", "effectVariant": "int", }, }, @@ -1238,8 +1238,8 @@ class ChipClusters: "commandId": 0x00000000, "commandName": "QueryImage", "args": { - "vendorId": "int", - "productId": "int", + "vendorID": "int", + "productID": "int", "softwareVersion": "int", "protocolsSupported": "int", "hardwareVersion": "int", @@ -1292,10 +1292,10 @@ class ChipClusters: "commands": { 0x00000000: { "commandId": 0x00000000, - "commandName": "AnnounceOtaProvider", + "commandName": "AnnounceOTAProvider", "args": { - "providerNodeId": "int", - "vendorId": "int", + "providerNodeID": "int", + "vendorID": "int", "announcementReason": "int", "metadataForNode": "bytes", "endpoint": "int", @@ -1304,7 +1304,7 @@ class ChipClusters: }, "attributes": { 0x00000000: { - "attributeName": "DefaultOtaProviders", + "attributeName": "DefaultOTAProviders", "attributeId": 0x00000000, "type": "", "reportable": True, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index b349d7345369f8..a72378c2f393b3 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -267,11 +267,11 @@ class AddGroup(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="groupName", Tag=1, Type=str), ]) - groupId: 'uint' = 0 + groupID: 'uint' = 0 groupName: 'str' = "" @dataclass @@ -286,11 +286,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), ]) status: 'uint' = 0 - groupId: 'uint' = 0 + groupID: 'uint' = 0 @dataclass class ViewGroup(ClusterCommand): @@ -303,10 +303,10 @@ class ViewGroup(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ]) - groupId: 'uint' = 0 + groupID: 'uint' = 0 @dataclass class ViewGroupResponse(ClusterCommand): @@ -320,12 +320,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="groupName", Tag=2, Type=str), ]) status: 'uint' = 0 - groupId: 'uint' = 0 + groupID: 'uint' = 0 groupName: 'str' = "" @dataclass @@ -373,10 +373,10 @@ class RemoveGroup(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ]) - groupId: 'uint' = 0 + groupID: 'uint' = 0 @dataclass class RemoveGroupResponse(ClusterCommand): @@ -390,11 +390,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), ]) status: 'uint' = 0 - groupId: 'uint' = 0 + groupID: 'uint' = 0 @dataclass class RemoveAllGroups(ClusterCommand): @@ -421,11 +421,11 @@ class AddGroupIfIdentifying(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="groupName", Tag=1, Type=str), ]) - groupId: 'uint' = 0 + groupID: 'uint' = 0 groupName: 'str' = "" @@ -1265,11 +1265,11 @@ class OffWithEffect(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="effectId", Tag=0, Type=OnOff.Enums.OnOffEffectIdentifier), + ClusterObjectFieldDescriptor(Label="effectIdentifier", Tag=0, Type=OnOff.Enums.OnOffEffectIdentifier), ClusterObjectFieldDescriptor(Label="effectVariant", Tag=1, Type=OnOff.Enums.OnOffDelayedAllOffEffectVariant), ]) - effectId: 'OnOff.Enums.OnOffEffectIdentifier' = 0 + effectIdentifier: 'OnOff.Enums.OnOffEffectIdentifier' = 0 effectVariant: 'OnOff.Enums.OnOffDelayedAllOffEffectVariant' = 0 @dataclass @@ -2583,11 +2583,11 @@ class DeviceTypeStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="type", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="deviceType", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="revision", Tag=1, Type=uint), ]) - type: 'uint' = 0 + deviceType: 'uint' = 0 revision: 'uint' = 0 @@ -2894,8 +2894,8 @@ class AccessControl(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="acl", Tag=0x00000000, Type=typing.List[AccessControl.Structs.AccessControlEntry]), - ClusterObjectFieldDescriptor(Label="extension", Tag=0x00000001, Type=typing.Optional[typing.List[AccessControl.Structs.ExtensionEntry]]), + ClusterObjectFieldDescriptor(Label="acl", Tag=0x00000000, Type=typing.List[AccessControl.Structs.AccessControlEntryStruct]), + ClusterObjectFieldDescriptor(Label="extension", Tag=0x00000001, Type=typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]), ClusterObjectFieldDescriptor(Label="subjectsPerAccessControlEntry", Tag=0x00000002, Type=uint), ClusterObjectFieldDescriptor(Label="targetsPerAccessControlEntry", Tag=0x00000003, Type=uint), ClusterObjectFieldDescriptor(Label="accessControlEntriesPerFabric", Tag=0x00000004, Type=uint), @@ -2906,8 +2906,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - acl: 'typing.List[AccessControl.Structs.AccessControlEntry]' = None - extension: 'typing.Optional[typing.List[AccessControl.Structs.ExtensionEntry]]' = None + acl: 'typing.List[AccessControl.Structs.AccessControlEntryStruct]' = None + extension: 'typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]' = None subjectsPerAccessControlEntry: 'uint' = None targetsPerAccessControlEntry: 'uint' = None accessControlEntriesPerFabric: 'uint' = None @@ -2918,23 +2918,23 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class AuthMode(IntEnum): + class AccessControlEntryAuthModeEnum(IntEnum): kPase = 0x01 kCase = 0x02 kGroup = 0x03 - class ChangeTypeEnum(IntEnum): - kChanged = 0x00 - kAdded = 0x01 - kRemoved = 0x02 - - class Privilege(IntEnum): + class AccessControlEntryPrivilegeEnum(IntEnum): kView = 0x01 kProxyView = 0x02 kOperate = 0x03 kManage = 0x04 kAdminister = 0x05 + class ChangeTypeEnum(IntEnum): + kChanged = 0x00 + kAdded = 0x01 + kRemoved = 0x02 + class Structs: @dataclass @@ -2953,26 +2953,26 @@ def descriptor(cls) -> ClusterObjectDescriptor: deviceType: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class AccessControlEntry(ClusterObject): + class AccessControlEntryStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="privilege", Tag=1, Type=AccessControl.Enums.Privilege), - ClusterObjectFieldDescriptor(Label="authMode", Tag=2, Type=AccessControl.Enums.AuthMode), + ClusterObjectFieldDescriptor(Label="privilege", Tag=1, Type=AccessControl.Enums.AccessControlEntryPrivilegeEnum), + ClusterObjectFieldDescriptor(Label="authMode", Tag=2, Type=AccessControl.Enums.AccessControlEntryAuthModeEnum), ClusterObjectFieldDescriptor(Label="subjects", Tag=3, Type=typing.Union[Nullable, typing.List[uint]]), ClusterObjectFieldDescriptor(Label="targets", Tag=4, Type=typing.Union[Nullable, typing.List[AccessControl.Structs.Target]]), ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - privilege: 'AccessControl.Enums.Privilege' = 0 - authMode: 'AccessControl.Enums.AuthMode' = 0 + privilege: 'AccessControl.Enums.AccessControlEntryPrivilegeEnum' = 0 + authMode: 'AccessControl.Enums.AccessControlEntryAuthModeEnum' = 0 subjects: 'typing.Union[Nullable, typing.List[uint]]' = NullValue targets: 'typing.Union[Nullable, typing.List[AccessControl.Structs.Target]]' = NullValue fabricIndex: 'uint' = 0 @dataclass - class ExtensionEntry(ClusterObject): + class AccessControlExtensionStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( @@ -3000,9 +3000,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[AccessControl.Structs.AccessControlEntry]) + return ClusterObjectFieldDescriptor(Type=typing.List[AccessControl.Structs.AccessControlEntryStruct]) - value: 'typing.List[AccessControl.Structs.AccessControlEntry]' = field(default_factory=lambda: []) + value: 'typing.List[AccessControl.Structs.AccessControlEntryStruct]' = field(default_factory=lambda: []) @dataclass class Extension(ClusterAttributeDescriptor): @@ -3016,9 +3016,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[AccessControl.Structs.ExtensionEntry]]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]) - value: 'typing.Optional[typing.List[AccessControl.Structs.ExtensionEntry]]' = None + value: 'typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]' = None @dataclass class SubjectsPerAccessControlEntry(ClusterAttributeDescriptor): @@ -3167,14 +3167,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), - ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.AccessControlEntry]), + ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.AccessControlEntryStruct]), ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) adminNodeID: 'typing.Union[Nullable, uint]' = NullValue adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 - latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlEntry]' = NullValue + latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlEntryStruct]' = NullValue fabricIndex: 'uint' = 0 @dataclass @@ -3194,14 +3194,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), - ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.ExtensionEntry]), + ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.AccessControlExtensionStruct]), ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) adminNodeID: 'typing.Union[Nullable, uint]' = NullValue adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 - latestValue: 'typing.Union[Nullable, AccessControl.Structs.ExtensionEntry]' = NullValue + latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlExtensionStruct]' = NullValue fabricIndex: 'uint' = 0 @@ -4332,8 +4332,8 @@ class QueryImage(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="vendorId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="productId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="vendorID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="productID", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="protocolsSupported", Tag=3, Type=typing.List[OtaSoftwareUpdateProvider.Enums.OTADownloadProtocol]), ClusterObjectFieldDescriptor(Label="hardwareVersion", Tag=4, Type=typing.Optional[uint]), @@ -4342,8 +4342,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="metadataForProvider", Tag=7, Type=typing.Optional[bytes]), ]) - vendorId: 'uint' = 0 - productId: 'uint' = 0 + vendorID: 'uint' = 0 + productID: 'uint' = 0 softwareVersion: 'uint' = 0 protocolsSupported: 'typing.List[OtaSoftwareUpdateProvider.Enums.OTADownloadProtocol]' = field(default_factory=lambda: []) hardwareVersion: 'typing.Optional[uint]' = None @@ -4527,7 +4527,7 @@ class OtaSoftwareUpdateRequestor(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="defaultOtaProviders", Tag=0x00000000, Type=typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]), + ClusterObjectFieldDescriptor(Label="defaultOTAProviders", Tag=0x00000000, Type=typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]), ClusterObjectFieldDescriptor(Label="updatePossible", Tag=0x00000001, Type=bool), ClusterObjectFieldDescriptor(Label="updateState", Tag=0x00000002, Type=OtaSoftwareUpdateRequestor.Enums.OTAUpdateStateEnum), ClusterObjectFieldDescriptor(Label="updateStateProgress", Tag=0x00000003, Type=typing.Union[Nullable, uint]), @@ -4538,7 +4538,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - defaultOtaProviders: 'typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]' = None + defaultOTAProviders: 'typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]' = None updatePossible: 'bool' = None updateState: 'OtaSoftwareUpdateRequestor.Enums.OTAUpdateStateEnum' = None updateStateProgress: 'typing.Union[Nullable, uint]' = None @@ -4593,7 +4593,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass - class AnnounceOtaProvider(ClusterCommand): + class AnnounceOTAProvider(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x002A command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True @@ -4603,15 +4603,15 @@ class AnnounceOtaProvider(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="providerNodeId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="vendorId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="providerNodeID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="vendorID", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="announcementReason", Tag=2, Type=OtaSoftwareUpdateRequestor.Enums.OTAAnnouncementReason), ClusterObjectFieldDescriptor(Label="metadataForNode", Tag=3, Type=typing.Optional[bytes]), ClusterObjectFieldDescriptor(Label="endpoint", Tag=4, Type=uint), ]) - providerNodeId: 'uint' = 0 - vendorId: 'uint' = 0 + providerNodeID: 'uint' = 0 + vendorID: 'uint' = 0 announcementReason: 'OtaSoftwareUpdateRequestor.Enums.OTAAnnouncementReason' = 0 metadataForNode: 'typing.Optional[bytes]' = None endpoint: 'uint' = 0 @@ -4619,7 +4619,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: @dataclass - class DefaultOtaProviders(ClusterAttributeDescriptor): + class DefaultOTAProviders(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x002A diff --git a/src/controller/python/chip/utils/CommissioningBuildingBlocks.py b/src/controller/python/chip/utils/CommissioningBuildingBlocks.py index 20dbcd6441a746..d68b32bf013f1e 100644 --- a/src/controller/python/chip/utils/CommissioningBuildingBlocks.py +++ b/src/controller/python/chip/utils/CommissioningBuildingBlocks.py @@ -43,7 +43,7 @@ async def _IsNodeInFabricList(devCtrl, nodeId): return False -async def GrantPrivilege(adminCtrl: ChipDeviceController, grantedCtrl: ChipDeviceController, privilege: Clusters.AccessControl.Enums.Privilege, targetNodeId: int, targetCatTags: typing.List[int] = []): +async def GrantPrivilege(adminCtrl: ChipDeviceController, grantedCtrl: ChipDeviceController, privilege: Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum, targetNodeId: int, targetCatTags: typing.List[int] = []): ''' Given an existing controller with admin privileges over a target node, grants the specified privilege to the new ChipDeviceController instance to the entire Node. This is achieved by updating the ACL entries on the target. @@ -96,8 +96,8 @@ async def GrantPrivilege(adminCtrl: ChipDeviceController, grantedCtrl: ChipDevic raise ValueError( f"Cannot add another ACL entry to grant privilege to existing count of {currentAcls} ACLs -- will exceed minimas!") - currentAcls.append(Clusters.AccessControl.Structs.AccessControlEntry(privilege=privilege, authMode=Clusters.AccessControl.Enums.AuthMode.kCase, - subjects=targetSubjects)) + currentAcls.append(Clusters.AccessControl.Structs.AccessControlEntryStruct(privilege=privilege, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, + subjects=targetSubjects)) # Step 4: Prune ACLs which have empty subjects. currentAcls = [acl for acl in currentAcls if acl.subjects != NullValue and len(acl.subjects) != 0] @@ -106,7 +106,7 @@ async def GrantPrivilege(adminCtrl: ChipDeviceController, grantedCtrl: ChipDevic await adminCtrl.WriteAttribute(targetNodeId, [(0, Clusters.AccessControl.Attributes.Acl(currentAcls))]) -async def CreateControllersOnFabric(fabricAdmin: FabricAdmin, adminDevCtrl: ChipDeviceController, controllerNodeIds: typing.List[int], privilege: Clusters.AccessControl.Enums.Privilege, targetNodeId: int, catTags: typing.List[int] = []) -> typing.List[ChipDeviceController]: +async def CreateControllersOnFabric(fabricAdmin: FabricAdmin, adminDevCtrl: ChipDeviceController, controllerNodeIds: typing.List[int], privilege: Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum, targetNodeId: int, catTags: typing.List[int] = []) -> typing.List[ChipDeviceController]: ''' Create new ChipDeviceController instances on a given fabric with a specific privilege on a target node. Args: diff --git a/src/controller/python/chip/yaml/__init__.py b/src/controller/python/chip/yaml/__init__.py index 055bec97cafac4..08850e21feea48 100644 --- a/src/controller/python/chip/yaml/__init__.py +++ b/src/controller/python/chip/yaml/__init__.py @@ -20,4 +20,4 @@ # Provides Python APIs for Matter. """Provides yaml parser Python APIs for Matter.""" -from . import parser +from . import runner diff --git a/src/controller/python/chip/yaml/constraints.py b/src/controller/python/chip/yaml/constraints.py deleted file mode 100644 index 49ac8c99153eff..00000000000000 --- a/src/controller/python/chip/yaml/constraints.py +++ /dev/null @@ -1,221 +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. -# - -from abc import ABC, abstractmethod -import chip.yaml.format_converter as Converter -from .variable_storage import VariableStorage - - -class ConstraintValidationError(Exception): - def __init__(self, message): - super().__init__(message) - - -class BaseConstraint(ABC): - '''Constrain Interface''' - - @abstractmethod - def is_met(self, response) -> bool: - pass - - -class _LoadableConstraint(BaseConstraint): - '''Constraints where value might be stored in VariableStorage needing runtime load.''' - - def __init__(self, value, field_type, variable_storage: VariableStorage, config_values: dict): - self._variable_storage = variable_storage - # When not none _indirect_value_key is binding a name to the constraint value, and the - # actual value can only be looked-up dynamically, which is why this is a key name. - self._indirect_value_key = None - self._value = None - - if value is None: - # Default values set above is all we need here. - return - - if isinstance(value, str) and self._variable_storage.is_key_saved(value): - self._indirect_value_key = value - else: - self._value = Converter.parse_and_convert_yaml_value( - value, field_type, config_values) - - def get_value(self): - '''Gets the current value of the constraint. - - This method accounts for getting the runtime saved value from DUT previous responses. - ''' - if self._indirect_value_key: - return self._variable_storage.load(self._indirect_value_key) - return self._value - - -class _ConstraintHasValue(BaseConstraint): - def __init__(self, has_value): - self._has_value = has_value - - def is_met(self, response) -> bool: - raise ConstraintValidationError('HasValue constraint currently not implemented') - - -class _ConstraintType(BaseConstraint): - def __init__(self, type): - self._type = type - - def is_met(self, response) -> bool: - raise ConstraintValidationError('Type constraint currently not implemented') - - -class _ConstraintStartsWith(BaseConstraint): - def __init__(self, starts_with): - self._starts_with = starts_with - - def is_met(self, response) -> bool: - return response.startswith(self._starts_with) - - -class _ConstraintEndsWith(BaseConstraint): - def __init__(self, ends_with): - self._ends_with = ends_with - - def is_met(self, response) -> bool: - return response.endswith(self._ends_with) - - -class _ConstraintIsUpperCase(BaseConstraint): - def __init__(self, is_upper_case): - self._is_upper_case = is_upper_case - - def is_met(self, response) -> bool: - return response.isupper() == self._is_upper_case - - -class _ConstraintIsLowerCase(BaseConstraint): - def __init__(self, is_lower_case): - self._is_lower_case = is_lower_case - - def is_met(self, response) -> bool: - return response.islower() == self._is_lower_case - - -class _ConstraintMinValue(_LoadableConstraint): - def __init__(self, min_value, field_type, variable_storage: VariableStorage, - config_values: dict): - super().__init__(min_value, field_type, variable_storage, config_values) - - def is_met(self, response) -> bool: - min_value = self.get_value() - return response >= min_value - - -class _ConstraintMaxValue(_LoadableConstraint): - def __init__(self, max_value, field_type, variable_storage: VariableStorage, - config_values: dict): - super().__init__(max_value, field_type, variable_storage, config_values) - - def is_met(self, response) -> bool: - max_value = self.get_value() - return response <= max_value - - -class _ConstraintContains(BaseConstraint): - def __init__(self, contains): - self._contains = contains - - def is_met(self, response) -> bool: - return set(self._contains).issubset(response) - - -class _ConstraintExcludes(BaseConstraint): - def __init__(self, excludes): - self._excludes = excludes - - def is_met(self, response) -> bool: - return set(self._excludes).isdisjoint(response) - - -class _ConstraintHasMaskSet(BaseConstraint): - def __init__(self, has_masks_set): - self._has_masks_set = has_masks_set - - def is_met(self, response) -> bool: - return all([(response & mask) == mask for mask in self._has_masks_set]) - - -class _ConstraintHasMaskClear(BaseConstraint): - def __init__(self, has_masks_clear): - self._has_masks_clear = has_masks_clear - - def is_met(self, response) -> bool: - return all([(response & mask) == 0 for mask in self._has_masks_clear]) - - -class _ConstraintNotValue(_LoadableConstraint): - def __init__(self, not_value, field_type, variable_storage: VariableStorage, - config_values: dict): - super().__init__(not_value, field_type, variable_storage, config_values) - - def is_met(self, response) -> bool: - not_value = self.get_value() - return response != not_value - - -def get_constraints(constraints, field_type, variable_storage: VariableStorage, - config_values: dict) -> list[BaseConstraint]: - _constraints = [] - if 'hasValue' in constraints: - _constraints.append(_ConstraintHasValue(constraints.get('hasValue'))) - - if 'type' in constraints: - _constraints.append(_ConstraintType(constraints.get('type'))) - - if 'startsWith' in constraints: - _constraints.append(_ConstraintStartsWith(constraints.get('startsWith'))) - - if 'endsWith' in constraints: - _constraints.append(_ConstraintEndsWith(constraints.get('endsWith'))) - - if 'isUpperCase' in constraints: - _constraints.append(_ConstraintIsUpperCase(constraints.get('isUpperCase'))) - - if 'isLowerCase' in constraints: - _constraints.append(_ConstraintIsLowerCase(constraints.get('isLowerCase'))) - - if 'minValue' in constraints: - _constraints.append(_ConstraintMinValue( - constraints.get('minValue'), field_type, variable_storage, config_values)) - - if 'maxValue' in constraints: - _constraints.append(_ConstraintMaxValue( - constraints.get('maxValue'), field_type, variable_storage, config_values)) - - if 'contains' in constraints: - _constraints.append(_ConstraintContains(constraints.get('contains'))) - - if 'excludes' in constraints: - _constraints.append(_ConstraintExcludes(constraints.get('excludes'))) - - if 'hasMasksSet' in constraints: - _constraints.append(_ConstraintHasMaskSet(constraints.get('hasMasksSet'))) - - if 'hasMasksClear' in constraints: - _constraints.append(_ConstraintHasMaskClear(constraints.get('hasMasksClear'))) - - if 'notValue' in constraints: - _constraints.append(_ConstraintNotValue( - constraints.get('notValue'), field_type, variable_storage, config_values)) - - return _constraints diff --git a/src/controller/python/chip/yaml/data_model_lookup.py b/src/controller/python/chip/yaml/data_model_lookup.py index 1e0c3ffe6f3f14..215ac8fcbd9380 100644 --- a/src/controller/python/chip/yaml/data_model_lookup.py +++ b/src/controller/python/chip/yaml/data_model_lookup.py @@ -32,6 +32,10 @@ def get_command(self, cluster: str, command: str): def get_attribute(self, cluster: str, attribute: str): pass + @abstractmethod + def get_event(self, cluster: str, event: str): + pass + class PreDefinedDataModelLookup(DataModelLookup): def get_cluster(self, cluster: str): @@ -53,3 +57,10 @@ def get_attribute(self, cluster: str, attribute: str): return getattr(attributes, attribute, None) except AttributeError: return None + + def get_event(self, cluster: str, event: str): + try: + events = getattr(Clusters, cluster, None).Events + return getattr(events, event, None) + except AttributeError: + return None diff --git a/src/controller/python/chip/yaml/errors.py b/src/controller/python/chip/yaml/errors.py index e6c90123d1baad..092128f5b8d90e 100644 --- a/src/controller/python/chip/yaml/errors.py +++ b/src/controller/python/chip/yaml/errors.py @@ -20,7 +20,7 @@ def __init__(self, message): super().__init__(message) -class UnexpectedParsingError(ParsingError): +class UnexpectedParsingError(ValueError): def __init__(self, message): super().__init__(message) diff --git a/src/controller/python/chip/yaml/format_converter.py b/src/controller/python/chip/yaml/format_converter.py index fc3c5a1b873cfc..ce2edfdc6af4eb 100644 --- a/src/controller/python/chip/yaml/format_converter.py +++ b/src/controller/python/chip/yaml/format_converter.py @@ -20,73 +20,88 @@ from chip.tlv import uint, float32 import enum from chip.yaml.errors import ValidationError -import binascii -def substitute_in_config_variables(field_value, config_values: dict): - ''' Substitutes values that are config variables. +def _case_insensitive_getattr(object, attr_name, default): + for attr in dir(object): + if attr.lower() == attr_name.lower(): + return getattr(object, attr) + return default - YAML values can contain a string of a configuration variable name. In these instances we - substitute the configuration variable name with the actual value. - For examples see unittest src/controller/python/test/unit_tests/test_yaml_format_converter.py +def _get_target_type_fields(test_spec_definition, cluster_name, target_name): + element = test_spec_definition.get_type_by_name(cluster_name, target_name) + if hasattr(element, 'fields'): + return element.fields + return None - # TODO This should also substitue any saveAs values as well as perform any required - # evaluations. + +def from_data_model_to_test_definition(test_spec_definition, cluster_name, response_definition, + response_value): + '''Converts value from data model to definitions provided in test_spec_definition. Args: - 'field_value': Value as extracted from YAML. - 'config_values': Dictionary of global configuration variables. - Returns: - Value with all global configuration variables substituted with the real value. - ''' - if isinstance(field_value, dict): - return {key: substitute_in_config_variables( - field_value[key], config_values) for key in field_value} - if isinstance(field_value, list): - return [substitute_in_config_variables(item, config_values) for item in field_value] - if isinstance(field_value, str) and field_value in config_values: - config_value = config_values[field_value] - if isinstance(config_value, dict) and 'defaultValue' in config_value: - # TODO currently we don't validate that if config_value['type'] is provided - # that the type does in fact match our expectation. - return config_value['defaultValue'] - return config_values[field_value] - - return field_value - - -def convert_yaml_octet_string_to_bytes(s: str) -> bytes: - '''Convert YAML octet string body to bytes. - - Included handling any c-style hex escapes (e.g. \x5a) and 'hex:' prefix. + 'test_spec_definition': The spec cluster definition used by the test parser. + 'cluster_name': Used when we need to look up information in 'test_spec_definition'. + 'response_definition': Type we are converting 'response_value' to. This will be one of + two types: list[idl.matter_idl_types.Field] or idl.matter_idl_types.Field + 'response_value': Response value that we want to convert to ''' - # Step 1: handle explicit "hex:" prefix - if s.startswith('hex:'): - return binascii.unhexlify(s[4:]) - - # Step 2: convert non-hex-prefixed to bytes - # TODO(#23669): This does not properly support utf8 octet strings. We mimic - # javascript codegen behavior. Behavior of javascript is: - # * Octet string character >= u+0200 errors out. - # * Any character greater than 0xFF has the upper bytes chopped off. - as_bytes = [ord(c) for c in s] - - if any([value > 0x200 for value in as_bytes]): - raise ValueError('Unsupported char in octet string %r' % as_bytes) - accumulated_hex = ''.join([f"{(v & 0xFF):02x}" for v in as_bytes]) - return binascii.unhexlify(accumulated_hex) - - -def convert_name_value_pair_to_dict(arg_values): - ''' Fix yaml command arguments. - - For some reason, instead of treating the entire data payload of a - command as a singular struct, the top-level args are specified as 'name' - and 'value' pairs, while the payload of each argument is itself - correctly encapsulated. This fixes up this oddity to create a new - key/value pair with the key being the value of the 'name' field, and - the value being 'value' field. + if response_value is None: + return response_value + + # We first check to see if response_definition is list[idl.matter_idl_types.Field]. When we + # have list[idl.matter_idl_types.Field] that means we have a structure with multiple fields + # that need to be worked through recursively to properly convert the value to the right type. + if isinstance(response_definition, list): + rv = {} + for item in response_definition: + value = _case_insensitive_getattr(response_value, item.name, None) + if item.is_optional and value is None: + continue + rv[item.name] = from_data_model_to_test_definition(test_spec_definition, cluster_name, + item, value) + return rv + + # We convert uint to python int because constraints first check that it is an expected type. + response_value_type = type(response_value) + if response_value_type == uint: + return int(response_value) + + if response_definition is None: + return response_value + + if response_value is NullValue: + return None + + # For single float values types there seems to be a floating precision issue. By using '%g' + # it naturally give 6 most significat digits for us which is the amount of prcision we are + # looking for to give parity results to what chip-tool was getting (For TestCluster.yaml it + # give value back of `0.100000`. + if response_value_type == float32 and response_definition.data_type.name.lower() == 'single': + return float('%g' % response_value) + + response_sub_definition = _get_target_type_fields(test_spec_definition, cluster_name, + response_definition.data_type.name) + + # Check below is to see if the field itself is an array, for example array of ints. + if response_definition.is_list: + return [ + from_data_model_to_test_definition(test_spec_definition, cluster_name, + response_sub_definition, item) for item in response_value + ] + + return from_data_model_to_test_definition(test_spec_definition, cluster_name, + response_sub_definition, response_value) + + +def convert_list_of_name_value_pair_to_dict(arg_values): + '''Converts list of dict with items with keys 'name' and 'value' into single dict. + + The test step contains a list of arguments that have multiple properties other than + 'name' and 'value'. For the purposes of executing a test all these other attributes are not + important. We only want a simple dictionary of a new key/value where with the key being the + value of the 'name' field, and the value being 'value' field. ''' ret_value = {} @@ -96,21 +111,16 @@ def convert_name_value_pair_to_dict(arg_values): return ret_value -def convert_yaml_type(field_value, field_type, inline_cast_dict_to_struct): - ''' Converts yaml value to provided pythonic type. +def convert_to_data_model_type(field_value, field_type): + '''Converts value to provided data model pythonic object type. - The YAML representation when converted to a dictionary does not line up to - the python type data model for the various command/attribute/event object - types. This function converts 'field_value' to the appropriate provided + The values provided by parser does not line up to the python data model for the various + command/attribute/event object types. This function converts 'field_value' to the provided 'field_type'. Args: - 'field_value': Value as extracted from yaml - 'field_type': Pythonic command/attribute/event object type that we - are converting value to. - 'inline_cast_dict_to_struct': If true, for any dictionary 'field_value' - types provided we will do a convertion to the corresponding data - model class in `field_type` by doing field_type.FromDict(...). + 'field_value': Value as extracted by YAML parser. + 'field_type': Pythonic command/attribute/event object type that we are converting value to. ''' origin = typing.get_origin(field_type) @@ -152,10 +162,8 @@ def convert_yaml_type(field_value, field_type, inline_cast_dict_to_struct): raise ValidationError( f'Did not find field "{item}" in {str(field_type)}') from None - return_field_value[field_descriptor.Label] = convert_yaml_type( - field_value[item], field_descriptor.Type, inline_cast_dict_to_struct) - if inline_cast_dict_to_struct: - return field_type.FromDict(return_field_value) + return_field_value[field_descriptor.Label] = convert_to_data_model_type( + field_value[item], field_descriptor.Type) return return_field_value elif(type(field_value) is float): return float32(field_value) @@ -165,8 +173,7 @@ def convert_yaml_type(field_value, field_type, inline_cast_dict_to_struct): # The field type passed in is the type of the list element and not list[T]. for idx, item in enumerate(field_value): - field_value[idx] = convert_yaml_type(item, list_element_type, - inline_cast_dict_to_struct) + field_value[idx] = convert_to_data_model_type(item, list_element_type) return field_value # YAML conversion treats all numbers as ints. Convert to a uint type if the schema # type indicates so. @@ -177,31 +184,6 @@ def convert_yaml_type(field_value, field_type, inline_cast_dict_to_struct): # YAML treats enums as ints. Convert to the typed enum class. elif (issubclass(field_type, enum.Enum)): return field_type(field_value) - # YAML treats bytes as strings. Convert to a byte string. - elif (field_type == bytes and type(field_value) != bytes): - return convert_yaml_octet_string_to_bytes(field_value) # By default, just return the field_value casted to field_type. else: return field_type(field_value) - - -def parse_and_convert_yaml_value(field_value, field_type, config_values: dict, - inline_cast_dict_to_struct: bool = False): - ''' Parse and converts YAML type - - Parsing the YAML value means performing required substitutions and evaluations. Parsing is - then followed by converting from the YAML type done using yaml.safe_load() to the type used in - the various command/attribute/event object data model types. - - Args: - 'field_value': Value as extracted from yaml to be parsed - 'field_type': Pythonic command/attribute/event object type that we - are converting value to. - 'config_values': Dictionary of global configuration variables. - 'inline_cast_dict_to_struct': If true, for any dictionary 'field_value' - types provided we will do an inline convertion to the corresponding - struct in `field_type` by doing field_type.FromDict(...). - ''' - field_value_with_config_variables = substitute_in_config_variables(field_value, config_values) - return convert_yaml_type(field_value_with_config_variables, field_type, - inline_cast_dict_to_struct) diff --git a/src/controller/python/chip/yaml/parser.py b/src/controller/python/chip/yaml/parser.py deleted file mode 100644 index b70a743147063d..00000000000000 --- a/src/controller/python/chip/yaml/parser.py +++ /dev/null @@ -1,467 +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. -# - -from abc import ABC, abstractmethod -from dataclasses import dataclass, field -from chip import ChipDeviceCtrl -from chip.tlv import float32 -import yaml -import stringcase -import chip.interaction_model -import asyncio as asyncio -import logging -import math -from chip.yaml.errors import ParsingError, UnexpectedParsingError -from .data_model_lookup import * -import chip.yaml.format_converter as Converter -from .variable_storage import VariableStorage -from .constraints import get_constraints - -_SUCCESS_STATUS_CODE = "SUCCESS" -_NODE_ID_DEFAULT = 0x12345 -_ENDPOINT_DETAULT = '' # TODO why is this an empty string -_CLUSTER_DEFAULT = '' -_TIMEOUT_DEFAULT = 90 -logger = logging.getLogger('YamlParser') - - -@dataclass -class _ExecutionContext: - ''' Objects that is commonly passed around this file that are vital to test execution.''' - # Data model lookup to get python attribute, cluster, command object. - data_model_lookup: DataModelLookup = None - # Where various test action response are stored and loaded from. - variable_storage: VariableStorage = None - # Top level configuration values for a yaml test. - config_values: dict = None - - -class _VariableToSave: - def __init__(self, variable_name: str, variable_storage: VariableStorage): - self._variable_name = variable_name - self._variable_storage = variable_storage - self._variable_storage.save(self._variable_name, None) - - def save_response(self, value): - self._variable_storage.save(self._variable_name, value) - - -class _ExpectedResponse: - def __init__(self, value, response_type, context: _ExecutionContext): - self._load_expected_response_in_verify = None - self._expected_response_type = response_type - self._expected_response = None - self._variable_storage = context.variable_storage - if isinstance(value, str) and self._variable_storage.is_key_saved(value): - self._load_expected_response_in_verify = value - else: - self._expected_response = Converter.parse_and_convert_yaml_value( - value, response_type, context.config_values, inline_cast_dict_to_struct=True) - - def verify(self, response): - if (self._expected_response_type is None): - return True - - if self._load_expected_response_in_verify is not None: - self._expected_response = self._variable_storage.load( - self._load_expected_response_in_verify) - - if isinstance(self._expected_response_type, float32): - if not math.isclose(self._expected_response, response, rel_tol=1e-6): - logger.error(f"Expected response {self._expected_response} didn't match " - f"actual object {response}") - return False - - if (self._expected_response != response): - logger.error(f"Expected response {self._expected_response} didn't match " - f"actual object {response}") - return False - return True - - -class BaseAction(ABC): - '''Interface for a single yaml action that is to be executed.''' - - def __init__(self, label): - self._label = label - - @property - def label(self): - return self._label - - @abstractmethod - def run_action(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): - pass - - -class InvokeAction(BaseAction): - '''Single invoke action to be executed including validation of response.''' - - def __init__(self, item: dict, cluster: str, context: _ExecutionContext): - '''Parse cluster invoke from yaml test configuration. - - Args: - 'item': Dictionary containing single invoke to be parsed. - 'cluster': Name of cluster which to invoke action is targeting. - 'context': Contains test-wide common objects such as DataModelLookup instance, storage - for device responses and top level test configurations variable. - Raises: - ParsingError: Raised if there is a benign error, and there is currently no - action to perform for this write attribute. - UnexpectedParsingError: Raised if there is an unexpected parsing error. - ''' - super().__init__(item['label']) - self._command_name = stringcase.pascalcase(item['command']) - self._cluster = cluster - self._request_object = None - self._expected_raw_response: dict = field(default_factory=dict) - self._expected_response_object = None - - command = context.data_model_lookup.get_command( - self._cluster, self._command_name) - - if command is None: - raise ParsingError( - f'Failed to find cluster:{self._cluster} Command:{self._command_name}') - - command_object = command() - if (item.get('arguments')): - args = item['arguments']['values'] - - request_data_as_dict = Converter.convert_name_value_pair_to_dict(args) - - try: - request_data = Converter.parse_and_convert_yaml_value( - request_data_as_dict, type(command_object), context.config_values) - except ValueError: - raise ParsingError('Could not covert yaml type') - - # Create a cluster object for the request from the provided YAML data. - self._request_object = command_object.FromDict(request_data) - else: - self._request_object = command_object - - self._expected_raw_response = item.get('response') - - if (self._request_object.response_type is not None and - self._expected_raw_response is not None and - self._expected_raw_response.get('values')): - response_type = stringcase.pascalcase(self._request_object.response_type) - expected_command = context.data_model_lookup.get_command(self._cluster, - response_type) - expected_response_args = self._expected_raw_response['values'] - expected_response_data_as_dict = Converter.convert_name_value_pair_to_dict( - expected_response_args) - expected_response_data = Converter.parse_and_convert_yaml_value( - expected_response_data_as_dict, expected_command, context.config_values) - self._expected_response_object = expected_command.FromDict(expected_response_data) - - def run_action(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): - try: - resp = asyncio.run(dev_ctrl.SendCommand(node_id, endpoint, self._request_object)) - except chip.interaction_model.InteractionModelError: - if self._expected_raw_response is None: - raise - - expected_status_code = self._expected_raw_response.get('error') - if expected_status_code is not None and expected_status_code != _SUCCESS_STATUS_CODE: - logger.debug('Got error response, but was expected') - else: - raise - - if (self._expected_response_object is not None): - if (self._expected_response_object != resp): - logger.error(f'Expected response {self._expected_response_object} did not match ' - f'actual object {resp}') - - -class ReadAttributeAction(BaseAction): - '''Single read attribute action to be executed including validation.''' - - def __init__(self, item: dict, cluster: str, context: _ExecutionContext): - '''Parse read attribute action from yaml test configuration. - - Args: - 'item': Dictionary contains single read attribute action to be parsed. - 'cluster': Name of cluster read attribute action is targeting. - 'context': Contains test-wide common objects such as DataModelLookup instance, storage - for device responses and top level test configurations variable. - Raises: - ParsingError: Raised if there is a benign error, and there is currently no - action to perform for this read attribute. - UnexpectedParsingError: Raised if there is an unexpected parsing error. - ''' - super().__init__(item['label']) - self._attribute_name = stringcase.pascalcase(item['attribute']) - self._constraints = [] - self._cluster = cluster - self._cluster_object = None - self._request_object = None - self._expected_raw_response: dict = field(default_factory=dict) - self._expected_response: _ExpectedResponse = None - self._possibly_unsupported = False - self._variable_to_save = None - - self._cluster_object = context.data_model_lookup.get_cluster(self._cluster) - if self._cluster_object is None: - raise UnexpectedParsingError( - f'ReadAttribute failed to find cluster object:{self._cluster}') - - self._request_object = context.data_model_lookup.get_attribute( - self._cluster, self._attribute_name) - if self._request_object is None: - raise ParsingError( - f'ReadAttribute failed to find cluster:{self._cluster} ' - f'Attribute:{self._attribute_name}') - - if (item.get('arguments')): - raise UnexpectedParsingError( - f'ReadAttribute should not contain arguments. {self.label}') - - if self._request_object.attribute_type is None: - raise UnexpectedParsingError( - f'ReadAttribute doesnt have valid attribute_type. {self.label}') - - if 'optional' in item: - self._possibly_unsupported = True - - self._expected_raw_response = item.get('response') - if (self._expected_raw_response is None): - # TODO actually if response is missing it typically means that we need to confirm - # that we got a successful response. This will be implemented later to consider all - # possible corner cases around that (if there are corner cases). - raise UnexpectedParsingError(f'ReadAttribute missing expected response. {self.label}') - - variable_name = self._expected_raw_response.get('saveAs') - if variable_name: - self._variable_to_save = _VariableToSave(variable_name, context.variable_storage) - - if 'value' in self._expected_raw_response: - expected_response_value = self._expected_raw_response['value'] - self._expected_response = _ExpectedResponse(expected_response_value, - self._request_object.attribute_type.Type, - context) - - constraints = self._expected_raw_response.get('constraints') - if constraints: - self._constraints = get_constraints(constraints, - self._request_object.attribute_type.Type, - context.variable_storage, - context.config_values) - - def run_action(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): - try: - resp = asyncio.run(dev_ctrl.ReadAttribute(node_id, [(self._request_object)])) - except chip.interaction_model.InteractionModelError: - if self._expected_raw_response is None: - raise - - expected_status_code = self._expected_raw_response.get('error') - if expected_status_code is not None and expected_status_code != _SUCCESS_STATUS_CODE: - logger.debug('Got error response, but was expected') - else: - raise - - if self._possibly_unsupported and not resp: - # We have found an unsupported attribute. Parsed test did specify that it might be - # unsupported, so nothing left to validate. - return - - # TODO Currently there are no checks that this indexing won't fail. Need to add some - # initial validity checks. Coming soon an a future PR. - parsed_resp = resp[endpoint][self._cluster_object][self._request_object] - - if self._variable_to_save is not None: - self._variable_to_save.save_response(parsed_resp) - - if not all([constraint.is_met(parsed_resp) for constraint in self._constraints]): - logger.error(f'Constraints check failed') - # TODO how should we fail the test here? - - if self._expected_response is not None: - self._expected_response.verify(parsed_resp) - - -class WriteAttributeAction(BaseAction): - '''Single write attribute action to be executed including validation.''' - - def __init__(self, item: dict, cluster: str, context: _ExecutionContext): - '''Parse write attribute action from yaml test configuration. - - Args: - 'item': Dictionary contains single write attribute action to be parsed. - 'cluster': Name of cluster write attribute action is targeting. - 'context': Contains test-wide common objects such as DataModelLookup instance, storage - for device responses and top level test configurations variable. - Raises: - ParsingError: Raised if there is a benign error, and there is currently no - action to perform for this write attribute. - UnexpectedParsingError: Raised if there is an unexpected parsing error. - ''' - super().__init__(item['label']) - self._attribute_name = stringcase.pascalcase(item['attribute']) - self._cluster = cluster - self._request_object = None - - attribute = context.data_model_lookup.get_attribute( - self._cluster, self._attribute_name) - if attribute is None: - raise ParsingError( - f'WriteAttribute failed to find cluster:{self._cluster} ' - f'Attribute:{self._attribute_name}') - - if (item.get('arguments')): - args = item['arguments']['value'] - try: - request_data = Converter.parse_and_convert_yaml_value( - args, attribute.attribute_type.Type, context.config_values) - except ValueError: - raise ParsingError('Could not covert yaml type') - - # Create a cluster object for the request from the provided YAML data. - self._request_object = attribute(request_data) - else: - raise UnexpectedParsingError(f'WriteAttribute action does have arguments {self.label}') - - def run_action(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): - try: - resp = asyncio.run( - dev_ctrl.WriteAttribute(node_id, [(endpoint, self._request_object)])) - except chip.interaction_model.InteractionModelError: - if (self.expected_raw_response is not None and - self.expected_raw_response.get('error')): - logger.debug('Got error, but was expected') - else: - raise - - # TODO: confirm resp give a Success value, although not all write action are expected - # to succeed, hence why this is a todo and not simply just done. Below is example of - # what success check might look like. - # asserts.assert_equal(resp[0].Status, StatusEnum.Success, 'label write must succeed') - - -class YamlTestParser: - '''Parses the test YAMLs and converts to a more natural Pythonic representation. - - The parser also permits execution of those tests there-after. - ''' - - def __init__(self, yaml_path: str): - '''Constructor that parser the given a path to YAML test file.''' - with open(yaml_path, 'r') as stream: - try: - self._raw_data = yaml.safe_load(stream) - except yaml.YAMLError as exc: - raise exc - - if 'name' not in self._raw_data: - raise UnexpectedParsingError("YAML expected to have 'name'") - self._name = self._raw_data['name'] - - if 'config' not in self._raw_data: - raise UnexpectedParsingError("YAML expected to have 'config'") - self._config = self._raw_data['config'] - - self._config.setdefault('nodeId', _NODE_ID_DEFAULT) - self._config.setdefault('endpoint', _ENDPOINT_DETAULT) - self._config.setdefault('cluster', _CLUSTER_DEFAULT) - # TODO timeout is currently not used - self._config.setdefault('timeout', _TIMEOUT_DEFAULT) - - self._config['cluster'] = self._config['cluster'].replace(' ', '').replace('/', '') - self._base_action_test_list = [] - self._context = _ExecutionContext(data_model_lookup=PreDefinedDataModelLookup(), - variable_storage=VariableStorage(), - config_values=self._config) - - for item in self._raw_data['tests']: - # This currently behaves differently than the c++ version. We are evaluating if test - # is disabled before anything else, allowing for incorrectly named commands. - if item.get('disabled'): - logger.info(f"Test is disabled, skipping {item['label']}") - continue - - action = None - cluster = self._config['cluster'] - # Some of the tests contain 'cluster over-rides' that refer to a different - # cluster than that specified in 'config'. - if (item.get('cluster')): - cluster = item.get('cluster').replace(' ', '').replace('/', '') - if item['command'] == 'writeAttribute': - action = self._attribute_write_action_factory(item, cluster) - elif item['command'] == 'readAttribute': - action = self._attribute_read_action_factory(item, cluster) - else: - action = self._invoke_action_factory(item, cluster) - - if action is not None: - self._base_action_test_list.append(action) - else: - logger.warn(f"Failed to parse {item['label']}") - - def _invoke_action_factory(self, item: dict, cluster: str): - '''Parse cluster command from yaml test configuration. - - Args: - 'item': Dictionary contains single cluster action test to be parsed - 'cluster': Name of cluster action is targeting. - Returns: - InvokeAction if 'item' is a valid action to be executed. - None if 'item' was not parsed for a known reason that is not fatal. - ''' - try: - return InvokeAction(item, cluster, self._context) - except ParsingError: - return None - - def _attribute_read_action_factory(self, item: dict, cluster: str): - '''Parse read attribute action from yaml test configuration. - - Args: - 'item': Dictionary contains single read attribute action to be parsed. - 'cluster': Name of cluster read attribute action is targeting. - Returns: - ReadAttributeAction if 'item' is a valid action to be executed. - None if 'item' was not parsed for a known reason that is not fatal. - ''' - try: - return ReadAttributeAction(item, cluster, self._context) - except ParsingError: - return None - - def _attribute_write_action_factory(self, item: dict, cluster: str): - '''Parse write attribute action from yaml test configuration. - - Args: - 'item': Dictionary contains single write attribute action to be parsed. - 'cluster': Name of cluster write attribute action is targeting. - Returns: - WriteAttributeAction if 'item' is a valid action to be executed. - None if 'item' was not parsed for a known reason that is not fatal. - ''' - try: - return WriteAttributeAction(item, cluster, self._context) - except ParsingError: - return None - - def execute_tests(self, dev_ctrl: ChipDeviceCtrl): - '''Executes parsed YAML tests.''' - self._context.variable_storage.clear() - for idx, action in enumerate(self._base_action_test_list): - logger.info(f'test: {idx} -- Executing{action.label}') - - action.run_action(dev_ctrl, self._config['endpoint'], self._config['nodeId']) diff --git a/src/controller/python/chip/yaml/runner.py b/src/controller/python/chip/yaml/runner.py new file mode 100644 index 00000000000000..f55d6ccb2efce7 --- /dev/null +++ b/src/controller/python/chip/yaml/runner.py @@ -0,0 +1,386 @@ +# +# 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. +# + +from abc import ABC, abstractmethod +from dataclasses import dataclass +from chip import ChipDeviceCtrl +from enum import Enum +import stringcase +import chip.interaction_model +import asyncio as asyncio +import logging +from chip.yaml.errors import ParsingError, UnexpectedParsingError +from chip.clusters.Attribute import AttributeStatus, ValueDecodeFailure +from .data_model_lookup import * +import chip.yaml.format_converter as Converter + +logger = logging.getLogger('YamlParser') + + +class _ActionStatus(Enum): + SUCCESS = 'success', + ERROR = 'error' + + +@dataclass +class _ActionResult: + status: _ActionStatus + response: object + + +@dataclass +class _ExecutionContext: + ''' Objects that is commonly passed around this file that are vital to test execution.''' + # Data model lookup to get python attribute, cluster, command object. + data_model_lookup: DataModelLookup = None + + +class BaseAction(ABC): + '''Interface for a single YAML action that is to be executed.''' + + def __init__(self, label): + self._label = label + + @property + def label(self): + return self._label + + @abstractmethod + def run_action(self, dev_ctrl: ChipDeviceCtrl) -> _ActionResult: + pass + + +class InvokeAction(BaseAction): + '''Single invoke action to be executed.''' + + def __init__(self, test_step, cluster: str, context: _ExecutionContext): + '''Converts 'test_step' to invoke command action that can execute with ChipDeviceCtrl. + + Args: + 'test_step': Step containing information required to run invoke command action. + 'cluster': Name of cluster which to invoke action is targeting. + 'context': Contains test-wide common objects such as DataModelLookup instance. + Raises: + ParsingError: Raised if there is a benign error, and there is currently no + action to perform for this write attribute. + UnexpectedParsingError: Raised if there is an unexpected parsing error. + ''' + super().__init__(test_step.label) + self._command_name = stringcase.pascalcase(test_step.command) + self._cluster = cluster + self._request_object = None + self._expected_response_object = None + self._endpoint = test_step.endpoint + self._node_id = test_step.node_id + + command = context.data_model_lookup.get_command(self._cluster, self._command_name) + + if command is None: + raise ParsingError( + f'Failed to find cluster:{self._cluster} Command:{self._command_name}') + + command_object = command() + if (test_step.arguments): + args = test_step.arguments['values'] + request_data_as_dict = Converter.convert_list_of_name_value_pair_to_dict(args) + + try: + request_data = Converter.convert_to_data_model_type( + request_data_as_dict, type(command_object)) + except ValueError: + # TODO after allowing out of bounds enums to be written this should be changed to + # UnexpectedParsingError. + raise ParsingError('Could not covert yaml type') + + self._request_object = command_object.FromDict(request_data) + else: + self._request_object = command_object + + def run_action(self, dev_ctrl: ChipDeviceCtrl) -> _ActionResult: + try: + resp = asyncio.run(dev_ctrl.SendCommand(self._node_id, self._endpoint, + self._request_object)) + except chip.interaction_model.InteractionModelError as error: + return _ActionResult(status=_ActionStatus.ERROR, response=error) + + # Commands with no response give a None response. In those cases we return a success + return _ActionResult(status=_ActionStatus.SUCCESS, response=resp) + + +class ReadAttributeAction(BaseAction): + '''Single read attribute action to be executed.''' + + def __init__(self, test_step, cluster: str, context: _ExecutionContext): + '''Converts 'test_step' to read attribute action that can execute with ChipDeviceCtrl. + + Args: + 'test_step': Step containing information required to run read attribute action. + 'cluster': Name of cluster read attribute action is targeting. + 'context': Contains test-wide common objects such as DataModelLookup instance. + Raises: + ParsingError: Raised if there is a benign error, and there is currently no + action to perform for this read attribute. + UnexpectedParsingError: Raised if there is an unexpected parsing error. + ''' + super().__init__(test_step.label) + self._attribute_name = stringcase.pascalcase(test_step.attribute) + self._cluster = cluster + self._endpoint = test_step.endpoint + self._node_id = test_step.node_id + self._cluster_object = None + self._request_object = None + + self._possibly_unsupported = bool(test_step.optional) + + self._cluster_object = context.data_model_lookup.get_cluster(self._cluster) + if self._cluster_object is None: + raise UnexpectedParsingError( + f'ReadAttribute failed to find cluster object:{self._cluster}') + + self._request_object = context.data_model_lookup.get_attribute( + self._cluster, self._attribute_name) + if self._request_object is None: + raise ParsingError( + f'ReadAttribute failed to find cluster:{self._cluster} ' + f'Attribute:{self._attribute_name}') + + if test_step.arguments: + raise UnexpectedParsingError( + f'ReadAttribute should not contain arguments. {self.label}') + + if self._request_object.attribute_type is None: + raise UnexpectedParsingError( + f'ReadAttribute doesnt have valid attribute_type. {self.label}') + + def run_action(self, dev_ctrl: ChipDeviceCtrl) -> _ActionResult: + try: + raw_resp = asyncio.run(dev_ctrl.ReadAttribute(self._node_id, + [(self._endpoint, self._request_object)])) + except chip.interaction_model.InteractionModelError as error: + return _ActionResult(status=_ActionStatus.ERROR, response=error) + + if self._possibly_unsupported and not raw_resp: + # We have found an unsupported attribute. TestStep provided did specify that it might be + # unsupported, so nothing left to validate. We just return a failure here. + return _ActionResult(status=_ActionStatus.ERROR, response=None) + + # TODO Currently there are no checks that this indexing won't fail. Need to add some + # initial validity checks. Coming soon in a future PR. + resp = raw_resp[self._endpoint][self._cluster_object][self._request_object] + + if isinstance(resp, ValueDecodeFailure): + # response.Reason is of type chip.interaction_model.Status. + return _ActionResult(status=_ActionStatus.ERROR, response=resp.Reason) + + # decode() is expecting to get a DataModelLookup Object type to grab certain attributes + # like cluster id. + return_val = self._request_object(resp) + return _ActionResult(status=_ActionStatus.SUCCESS, response=return_val) + + +class WriteAttributeAction(BaseAction): + '''Single write attribute action to be executed.''' + + def __init__(self, test_step, cluster: str, context: _ExecutionContext): + '''Converts 'test_step' to write attribute action that can execute with ChipDeviceCtrl. + + Args: + 'test_step': Step containing information required to run write attribute action. + 'cluster': Name of cluster write attribute action is targeting. + 'context': Contains test-wide common objects such as DataModelLookup instance. + Raises: + ParsingError: Raised if there is a benign error, and there is currently no + action to perform for this write attribute. + UnexpectedParsingError: Raised if there is an unexpected parsing error. + ''' + super().__init__(test_step.label) + self._attribute_name = stringcase.pascalcase(test_step.attribute) + self._cluster = cluster + self._endpoint = test_step.endpoint + self._node_id = test_step.node_id + self._request_object = None + + attribute = context.data_model_lookup.get_attribute( + self._cluster, self._attribute_name) + if attribute is None: + raise ParsingError( + f'WriteAttribute failed to find cluster:{self._cluster} ' + f'Attribute:{self._attribute_name}') + + if not test_step.arguments: + raise UnexpectedParsingError(f'WriteAttribute action does have arguments {self.label}') + + args = test_step.arguments['values'] + if len(args) != 1: + raise UnexpectedParsingError(f'WriteAttribute is trying to write multiple values') + request_data_as_dict = args[0] + try: + # TODO this is an ugly hack + request_data = Converter.convert_to_data_model_type( + request_data_as_dict['value'], attribute.attribute_type.Type) + except ValueError: + raise ParsingError('Could not covert yaml type') + + # Create a cluster object for the request from the provided YAML data. + self._request_object = attribute(request_data) + + def run_action(self, dev_ctrl: ChipDeviceCtrl) -> _ActionResult: + try: + resp = asyncio.run( + dev_ctrl.WriteAttribute(self._node_id, [(self._endpoint, self._request_object)])) + except chip.interaction_model.InteractionModelError: + # TODO Should we be doing the same thing as InvokeAction on InteractionModelError? + raise + if len(resp) == 1 and isinstance(resp[0], AttributeStatus): + if resp[0].Status == chip.interaction_model.Status.Success: + return _ActionResult(status=_ActionStatus.SUCCESS, response=None) + else: + return _ActionResult(status=_ActionStatus.ERROR, response=resp[0].Status) + + # We always expecte the response to be a list of length 1, for that reason we return error + # here. + return _ActionResult(status=_ActionStatus.ERROR, response=None) + + +class ReplTestRunner: + '''Test runner to encode/decode values from YAML test Parser for executing the TestStep. + + Uses ChipDeviceCtrl from chip-repl to execute parsed YAML TestSteps. + ''' + + def __init__(self, test_spec_definition, dev_ctrl): + self._test_spec_definition = test_spec_definition + self._dev_ctrl = dev_ctrl + self._context = _ExecutionContext(data_model_lookup=PreDefinedDataModelLookup()) + + def _invoke_action_factory(self, test_step, cluster: str): + '''Creates cluster invoke action command from TestStep. + + Args: + 'test_step': Step containing information required to run an invoke command action. + 'cluster': Name of cluster action is targeting. + Returns: + InvokeAction if 'test_step' is a valid action to be executed. + None if we were unable to use the provided 'test_step' for a known reason that is not + fatal to test execution. + ''' + try: + return InvokeAction(test_step, cluster, self._context) + except ParsingError: + return None + + def _attribute_read_action_factory(self, test_step, cluster: str): + '''Creates read attribute command TestStep. + + Args: + 'test_step': Step containing information required to run read attribute action. + 'cluster': Name of cluster read attribute action is targeting. + Returns: + ReadAttributeAction if 'test_step' is a valid read attribute to be executed. + None if we were unable to use the provided 'test_step' for a known reason that is not + fatal to test execution. + ''' + try: + return ReadAttributeAction(test_step, cluster, self._context) + except ParsingError: + return None + + def _attribute_write_action_factory(self, test_step, cluster: str): + '''Creates write attribute command TestStep. + + Args: + 'test_step': Step containing information required to run write attribute action. + 'cluster': Name of cluster write attribute action is targeting. + Returns: + WriteAttributeAction if 'test_step' is a valid write attribute to be executed. + None if we were unable to use the provided 'test_step' for a known reason that is not + fatal to test execution. + ''' + try: + return WriteAttributeAction(test_step, cluster, self._context) + except ParsingError: + return None + + def encode(self, request) -> BaseAction: + action = None + cluster = request.cluster.replace(' ', '').replace('/', '') + command = request.command + # Some of the tests contain 'cluster over-rides' that refer to a different + # cluster than that specified in 'config'. + if command == 'writeAttribute': + action = self._attribute_write_action_factory(request, cluster) + elif command == 'readAttribute': + action = self._attribute_read_action_factory(request, cluster) + elif command == 'readEvent': + action = self._event_read_action_factory(request, cluster) + else: + action = self._invoke_action_factory(request, cluster) + + if action is None: + logger.warn(f"Failed to parse {request.label}") + return action + + def decode(self, result: _ActionResult): + # If this is a generic response, there is nothing to do. + if result.response is None: + # TODO Once yamltest and idl python packages are properly packaged as a single module + # the type we are returning will be formalized. For now TestStep.post_process_response + # expects this particular case to be sent as a string. + return 'success' if result.status == _ActionStatus.SUCCESS else 'failure' + + response = result.response + + decoded_response = {} + if isinstance(response, chip.interaction_model.InteractionModelError): + decoded_response['error'] = stringcase.snakecase(response.status.name).upper() + return decoded_response + + if isinstance(response, chip.interaction_model.Status): + decoded_response['error'] = stringcase.snakecase(response.name).upper() + return decoded_response + + cluster_name = self._test_spec_definition.get_cluster_name(response.cluster_id) + decoded_response['clusterId'] = cluster_name + + if hasattr(response, 'command_id'): + decoded_response['command'] = self._test_spec_definition.get_response_name( + response.cluster_id, response.command_id) + response_definition = self._test_spec_definition.get_response_by_name( + cluster_name, decoded_response['command']) + decoded_response['value'] = Converter.from_data_model_to_test_definition( + self._test_spec_definition, cluster_name, response_definition.fields, response) + + if hasattr(response, 'attribute_id'): + decoded_response['attribute'] = self._test_spec_definition.get_attribute_name( + response.cluster_id, response.attribute_id) + attribute = self._test_spec_definition.get_attribute_by_name( + cluster_name, decoded_response['attribute']) + # TODO Once we fix the issue of not being able to find the global attribute properly + # we should be able to remove this if/else statement below. + if attribute is None: + # When we cannot find the attribute it is because it is a global attribute like + # FeatureMap. Fortunately for these types we can get away with using + # 'response.value' directly for the time being. + decoded_response['value'] = response.value + else: + decoded_response['value'] = Converter.from_data_model_to_test_definition( + self._test_spec_definition, cluster_name, attribute.definition, response.value) + + return decoded_response + + def execute(self, action: BaseAction): + return action.run_action(self._dev_ctrl) diff --git a/src/controller/python/chip/yaml/variable_storage.py b/src/controller/python/chip/yaml/variable_storage.py deleted file mode 100644 index d62a7dd82c0ced..00000000000000 --- a/src/controller/python/chip/yaml/variable_storage.py +++ /dev/null @@ -1,37 +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. -# - -class VariableStorage: - '''Stores key value pairs. - - This is a code readability convience object for saving/loading values. - ''' - - def __init__(self): - self._saved_list = {} - - def save(self, key, value): - self._saved_list[key] = value - - def load(self, key): - return self._saved_list.get(key) - - def is_key_saved(self, key) -> bool: - return key in self._saved_list - - def clear(self): - self._saved_list.clear() diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index e68ade5b09bb8f..9995492c26c135 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -400,11 +400,11 @@ async def TestControllerCATValues(self, nodeid: int): return False # Grant the new controller privilege by adding the CAT tag to the subject. - await CommissioningBuildingBlocks.GrantPrivilege(adminCtrl=self.devCtrl, grantedCtrl=newControllers[0], privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, targetNodeId=nodeid, targetCatTags=[0x0001_0001]) + await CommissioningBuildingBlocks.GrantPrivilege(adminCtrl=self.devCtrl, grantedCtrl=newControllers[0], privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, targetNodeId=nodeid, targetCatTags=[0x0001_0001]) # Read out the attribute again - this time, it should succeed. res = await newControllers[0].ReadAttribute(nodeid=nodeid, attributes=[(0, Clusters.AccessControl.Attributes.Acl)]) - if (type(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl][0]) != Clusters.AccessControl.Structs.AccessControlEntry): + if (type(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl][0]) != Clusters.AccessControl.Structs.AccessControlEntryStruct): self.logger.error(f"2: Received something other than data:{res}") return False @@ -435,7 +435,7 @@ async def TestMultiControllerFabric(self, nodeid: int): # Doing this ensures that we're not somehow aliasing the CASE sessions. # res = await self.devCtrl.ReadAttribute(nodeid=nodeid, attributes=[(0, Clusters.AccessControl.Attributes.Acl)]) - if (type(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl][0]) != Clusters.AccessControl.Structs.AccessControlEntry): + if (type(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl][0]) != Clusters.AccessControl.Structs.AccessControlEntryStruct): self.logger.error(f"2: Received something other than data:{res}") return False @@ -451,25 +451,25 @@ async def TestMultiControllerFabric(self, nodeid: int): # # Grant the new controller admin privileges. Reading out the ACL cluster should now yield data. # - await CommissioningBuildingBlocks.GrantPrivilege(adminCtrl=self.devCtrl, grantedCtrl=newControllers[0], privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, targetNodeId=nodeid) + await CommissioningBuildingBlocks.GrantPrivilege(adminCtrl=self.devCtrl, grantedCtrl=newControllers[0], privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, targetNodeId=nodeid) res = await newControllers[0].ReadAttribute(nodeid=nodeid, attributes=[(0, Clusters.AccessControl.Attributes.Acl)]) - if (type(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl][0]) != Clusters.AccessControl.Structs.AccessControlEntry): + if (type(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl][0]) != Clusters.AccessControl.Structs.AccessControlEntryStruct): self.logger.error(f"4: Received something other than data:{res}") return False # # Grant the second new controller admin privileges as well. Reading out the ACL cluster should now yield data. # - await CommissioningBuildingBlocks.GrantPrivilege(adminCtrl=self.devCtrl, grantedCtrl=newControllers[1], privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, targetNodeId=nodeid) + await CommissioningBuildingBlocks.GrantPrivilege(adminCtrl=self.devCtrl, grantedCtrl=newControllers[1], privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, targetNodeId=nodeid) res = await newControllers[1].ReadAttribute(nodeid=nodeid, attributes=[(0, Clusters.AccessControl.Attributes.Acl)]) - if (type(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl][0]) != Clusters.AccessControl.Structs.AccessControlEntry): + if (type(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl][0]) != Clusters.AccessControl.Structs.AccessControlEntryStruct): self.logger.error(f"5: Received something other than data:{res}") return False # # Grant the second new controller just view privilege. Reading out the ACL cluster should return no data. # - await CommissioningBuildingBlocks.GrantPrivilege(adminCtrl=self.devCtrl, grantedCtrl=newControllers[1], privilege=Clusters.AccessControl.Enums.Privilege.kView, targetNodeId=nodeid) + await CommissioningBuildingBlocks.GrantPrivilege(adminCtrl=self.devCtrl, grantedCtrl=newControllers[1], privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, targetNodeId=nodeid) res = await newControllers[1].ReadAttribute(nodeid=nodeid, attributes=[(0, Clusters.AccessControl.Attributes.Acl)]) if(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl].Reason.status != IM.Status.UnsupportedAccess): self.logger.error(f"6: Received data5 instead of an error:{res}") diff --git a/src/controller/python/test/unit_tests/test_yaml_format_converter.py b/src/controller/python/test/unit_tests/test_yaml_format_converter.py deleted file mode 100644 index 05f58d20b59418..00000000000000 --- a/src/controller/python/test/unit_tests/test_yaml_format_converter.py +++ /dev/null @@ -1,121 +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. -# - -from chip.yaml.format_converter import convert_yaml_octet_string_to_bytes, substitute_in_config_variables -from binascii import unhexlify -import unittest - - -class TestOctetStringYamlDecode(unittest.TestCase): - def test_common_cases(self): - self.assertEqual(convert_yaml_octet_string_to_bytes("hex:aa55"), unhexlify("aa55")) - self.assertEqual(convert_yaml_octet_string_to_bytes("hex:"), unhexlify("")) - self.assertEqual(convert_yaml_octet_string_to_bytes("hex:AA55"), unhexlify("aa55")) - - self.assertEqual(convert_yaml_octet_string_to_bytes("0\xaa\x55"), unhexlify("30aa55")) - self.assertEqual(convert_yaml_octet_string_to_bytes("0\xAA\x55"), unhexlify("30aa55")) - self.assertEqual(convert_yaml_octet_string_to_bytes("0\xAa\x55"), unhexlify("30aa55")) - - self.assertEqual(convert_yaml_octet_string_to_bytes("0hex:"), b"0hex:") - self.assertEqual(convert_yaml_octet_string_to_bytes("0hex:A"), b"0hex:A") - self.assertEqual(convert_yaml_octet_string_to_bytes("0hex:AA55"), b"0hex:AA55") - - self.assertEqual(convert_yaml_octet_string_to_bytes("AA55"), b"AA55") - self.assertEqual(convert_yaml_octet_string_to_bytes("AA\n\r\t55"), unhexlify("41410a0d093535")) - # TODO(#23669): After utf8 is properly supported expected result is unhexlify("c3a9c3a90a0a") - self.assertEqual(convert_yaml_octet_string_to_bytes("\xC3\xA9é\n\n"), unhexlify("c3a9e90a0a")) - - # Partial hex nibble - with self.assertRaises(ValueError): - convert_yaml_octet_string_to_bytes("hex:aa5") - - -class TestSubstitueInConfigVariables(unittest.TestCase): - - def setUp(self): - self.common_config = { - 'arg1': { - 'defaultValue': 1 - }, - 'arg2': { - 'defaultValue': 2 - }, - 'no_explicit_default': 3 - } - - def test_basic_substitution(self): - self.assertEqual(substitute_in_config_variables('arg1', self.common_config), 1) - self.assertEqual(substitute_in_config_variables('arg2', self.common_config), 2) - self.assertEqual(substitute_in_config_variables('arg3', self.common_config), 'arg3') - self.assertEqual(substitute_in_config_variables('no_explicit_default', self.common_config), 3) - - def test_basis_dict_substitution(self): - basic_dict = { - 'arg1': 'arg1', - 'arg2': 'arg2', - 'arg3': 'arg3', - 'no_explicit_default': 'no_explicit_default', - } - expected_dict = { - 'arg1': 1, - 'arg2': 2, - 'arg3': 'arg3', - 'no_explicit_default': 3, - } - self.assertEqual(substitute_in_config_variables(basic_dict, self.common_config), expected_dict) - - def test_basis_list_substitution(self): - basic_list = ['arg1', 'arg2', 'arg3', 'no_explicit_default'] - expected_list = [1, 2, 'arg3', 3] - self.assertEqual(substitute_in_config_variables(basic_list, self.common_config), expected_list) - - def test_complex_nested_type(self): - complex_nested_type = { - 'arg1': ['arg1', 'arg2', 'arg3', 'no_explicit_default'], - 'arg2': 'arg22', - 'arg3': { - 'no_explicit_default': 'no_explicit_default', - 'arg2': 'arg2', - 'another_dict': { - 'arg1': ['arg1', 'arg1', 'arg1', 'no_explicit_default'], - }, - 'another_list': ['arg1', 'arg2', 'arg3', 'no_explicit_default'] - }, - 'no_explicit_default': 'no_explicit_default', - } - expected_result = { - 'arg1': [1, 2, 'arg3', 3], - 'arg2': 'arg22', - 'arg3': { - 'no_explicit_default': 3, - 'arg2': 2, - 'another_dict': { - 'arg1': [1, 1, 1, 3], - }, - 'another_list': [1, 2, 'arg3', 3] - }, - 'no_explicit_default': 3, - } - self.assertEqual(substitute_in_config_variables(complex_nested_type, self.common_config), expected_result) - - -def main(): - unittest.main() - - -if __name__ == "__main__": - main() diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm index 349c255e885eaa..8592a645982d89 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm @@ -746,8 +746,8 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath CHIP_ERROR MTROTAProviderDelegateBridge::ConvertToQueryImageParams( const Commands::QueryImage::DecodableType & commandData, MTROTASoftwareUpdateProviderClusterQueryImageParams * commandParams) { - commandParams.vendorId = [NSNumber numberWithUnsignedShort:commandData.vendorId]; - commandParams.productId = [NSNumber numberWithUnsignedShort:commandData.productId]; + commandParams.vendorID = [NSNumber numberWithUnsignedShort:commandData.vendorID]; + commandParams.productID = [NSNumber numberWithUnsignedShort:commandData.productID]; commandParams.softwareVersion = [NSNumber numberWithUnsignedLong:commandData.softwareVersion]; auto iterator = commandData.protocolsSupported.begin(); NSMutableArray * protocolsSupported = [[NSMutableArray alloc] init]; diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt index 930091b1d1f527..433c778543c4dd 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt @@ -82,32 +82,70 @@ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptio {{#zcl_clusters}} {{#zcl_enums}} {{#*inline "enumDef"}} -typedef NS_ENUM({{asUnderlyingZclType name}}, {{objCEnumName clusterName label}}) { +typedef NS_ENUM({{asUnderlyingZclType name}}, {{objCEnumName clusterName enumName}}) { {{#zcl_enum_items}} - {{objCEnumName ../clusterName ../label}}{{objCEnumItemLabel label}} {{availability ../clusterName enum=(asUpperCamelCase ../label preserveAcronyms=true) enumValue=(objCEnumItemLabel label) deprecationMessage=(concat "Please use " (objCEnumName (asUpperCamelCase ../../name preserveAcronyms=true) ../label) (objCEnumItemLabel label))}} = {{asHex value 2}}, + {{objCEnumName ../clusterName ../enumName}}{{objCEnumItemLabel label}} {{availability ../clusterName enum=../enumName enumValue=(objCEnumItemLabel label) deprecationMessage=(concat "Please use " (objCEnumName (asUpperCamelCase ../../name preserveAcronyms=true) ../label) (objCEnumItemLabel label))}} = {{asHex value 2}}, + {{#*inline "oldNameItemDecl"}} + {{#if oldItemName}} + {{objCEnumName ../clusterName ../enumName}}{{objCEnumItemLabel oldItemName}} {{availability ../clusterName enum=../enumName enumValue=oldItemName deprecationMessage=(concat "Please use " (objCEnumName (asUpperCamelCase ../../name preserveAcronyms=true) ../label) (objCEnumItemLabel label))}} = {{asHex value 2}}, + {{/if}} + {{/inline}} + {{> oldNameItemDecl oldItemName=(oldName ../clusterName enum=../enumName enumValue=(objCEnumItemLabel label))}} {{/zcl_enum_items}} } {{/inline}} -{{> enumDef name=name clusterName=(asUpperCamelCase ../name preserveAcronyms=true) label=label}} {{availability (asUpperCamelCase ../name preserveAcronyms=true) enum=(asUpperCamelCase label preserveAcronyms=true)}}; -{{#unless (isStrEqual (asUpperCamelCase ../name preserveAcronyms=true) (compatClusterNameRemapping ../name))}} +{{> enumDef name=name clusterName=(asUpperCamelCase ../name preserveAcronyms=true) enumName=(asUpperCamelCase label preserveAcronyms=true)}} {{availability (asUpperCamelCase ../name preserveAcronyms=true) enum=(asUpperCamelCase label preserveAcronyms=true)}}; +{{! Takes the name of the enum to use as enumName. }} +{{#*inline "oldNameDecl"}} -{{> enumDef name=name clusterName=(compatClusterNameRemapping ../name) label=label}} {{availability (compatClusterNameRemapping ../name) enum=(asUpperCamelCase label preserveAcronyms=true) deprecationMessage=(concat "Please use " (objCEnumName (asUpperCamelCase ../name preserveAcronyms=true) label))}}; -{{/unless}} +{{> enumDef name=name clusterName=(compatClusterNameRemapping ../name) enumName=enumName}} {{availability (compatClusterNameRemapping ../name) enum=enumName deprecationMessage=(concat "Please use " (objCEnumName (asUpperCamelCase ../name preserveAcronyms=true) label))}}; +{{/inline}} +{{! Takes the old name of the enum, if any, as oldEnumName. }} +{{#*inline "oldNameCheck"}} +{{#if (or oldEnumName + (hasOldName (asUpperCamelCase ../name preserveAcronyms=true)))}} +{{#if oldEnumName}} +{{> oldNameDecl enumName=oldEnumName}} +{{else}} +{{> oldNameDecl enumName=(asUpperCamelCase label preserveAcronyms=true)}} +{{/if}} +{{/if}} +{{/inline}} +{{> oldNameCheck oldEnumName=(oldName (asUpperCamelCase ../name preserveAcronyms=true) enum=(asUpperCamelCase label preserveAcronyms=true))}} {{/zcl_enums}} {{#zcl_bitmaps}} {{#*inline "bitmapDef"}} -typedef NS_OPTIONS({{asUnderlyingZclType name}}, {{objCEnumName clusterName label}}) { +typedef NS_OPTIONS({{asUnderlyingZclType name}}, {{objCEnumName clusterName bitmapName}}) { {{#zcl_bitmap_items}} - {{objCEnumName ../clusterName ../label}}{{objCEnumItemLabel label}} {{availability ../clusterName bitmap=(asUpperCamelCase ../label preserveAcronyms=true) bitmapValue=(objCEnumItemLabel label) deprecationMessage=(concat "Please use " (objCEnumName (asUpperCamelCase ../../name preserveAcronyms=true) ../label) (objCEnumItemLabel label))}} = {{asHex mask}}, + {{objCEnumName ../clusterName ../bitmapName}}{{objCEnumItemLabel label}} {{availability ../clusterName bitmap=../bitmapName bitmapValue=(objCEnumItemLabel label) deprecationMessage=(concat "Please use " (objCEnumName (asUpperCamelCase ../../name preserveAcronyms=true) ../label) (objCEnumItemLabel label))}} = {{asHex mask}}, + {{#*inline "oldNameItemDecl"}} + {{#if oldItemName}} + {{objCEnumName ../clusterName ../bitmapName}}{{objCEnumItemLabel oldItemName}} {{availability ../clusterName bitmap=../enumName bitmapValue=oldItemName deprecationMessage=(concat "Please use " (objCEnumName (asUpperCamelCase ../../name preserveAcronyms=true) ../label) (objCEnumItemLabel label))}} = {{asHex value 2}}, + {{/if}} + {{/inline}} + {{> oldNameItemDecl oldItemName=(oldName ../clusterName bitmap=../bitmapName bitmapValue=(objCEnumItemLabel label))}} {{/zcl_bitmap_items}} } {{/inline}} -{{> bitmapDef name=name clusterName=(asUpperCamelCase ../name preserveAcronyms=true) label=label}} {{availability (asUpperCamelCase ../name preserveAcronyms=true) bitmap=(asUpperCamelCase label preserveAcronyms=true)}}; -{{#unless (isStrEqual (asUpperCamelCase ../name preserveAcronyms=true) (compatClusterNameRemapping ../name))}} +{{> bitmapDef name=name clusterName=(asUpperCamelCase ../name preserveAcronyms=true) bitmapName=(asUpperCamelCase label preserveAcronyms=true)}} {{availability (asUpperCamelCase ../name preserveAcronyms=true) bitmap=(asUpperCamelCase label preserveAcronyms=true)}}; +{{! Takes the name of the bitmap to use as bitmapName. }} +{{#*inline "oldNameDecl"}} -{{> bitmapDef name=name clusterName=(compatClusterNameRemapping ../name) label=label}} {{availability (compatClusterNameRemapping ../name) bitmap=(asUpperCamelCase label preserveAcronyms=true) deprecationMessage=(concat "Please use " (objCEnumName (asUpperCamelCase ../name preserveAcronyms=true) label))}}; -{{/unless}} +{{> bitmapDef name=name clusterName=(compatClusterNameRemapping ../name) bitmapName=bitmapName}} {{availability (compatClusterNameRemapping ../name) bitmap=bitmapName deprecationMessage=(concat "Please use " (objCEnumName (asUpperCamelCase ../name preserveAcronyms=true) label))}}; +{{/inline}} +{{! Takes the old name of the bitmap, if any, as oldBitmapName. }} +{{#*inline "oldNameCheck"}} +{{#if (or oldBitmapName + (hasOldName (asUpperCamelCase ../name preserveAcronyms=true)))}} +{{#if oldBitmapName}} +{{> oldNameDecl bitmapName=oldBitmapName}} +{{else}} +{{> oldNameDecl bitmapName=(asUpperCamelCase label preserveAcronyms=true)}} +{{/if}} +{{/if}} +{{/inline}} +{{> oldNameCheck oldBitmapName=(oldName (asUpperCamelCase ../name preserveAcronyms=true) bitmap=(asUpperCamelCase label preserveAcronyms=true))}} {{/zcl_bitmaps}} diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt index a52a37ccbec471..521a1545088c8a 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt @@ -44,6 +44,13 @@ NS_ASSUME_NONNULL_BEGIN NSString *descriptionString = [NSString stringWithFormat:@"<%@: {{#zcl_command_arguments}}{{asStructPropertyName label}}:%@; {{/zcl_command_arguments}}>", NSStringFromClass([self class]) {{#zcl_command_arguments}},{{#if isArray}}_{{asStructPropertyName label}}{{else if (isOctetString type)}}[_{{asStructPropertyName label}} base64EncodedStringWithOptions:0]{{else}}_{{asStructPropertyName label}}{{/if}}{{/zcl_command_arguments}}]; return descriptionString; } +{{#zcl_command_arguments}} +{{#if (and includeRenamedProperties + (hasOldName ../cluster command=../command commandField=(asStructPropertyName label)))}} + +{{> renamed_struct_field_impl cluster=parent.parent.name type=type newName=label oldName=(oldName ../cluster command=../command commandField=(asStructPropertyName label))}} +{{/if}} +{{/zcl_command_arguments}} @end {{/unless}} @@ -51,19 +58,41 @@ NS_ASSUME_NONNULL_BEGIN {{#*inline "oldNameImpl"}} @implementation MTR{{cluster}}Cluster{{command}}Params +{{#zcl_command_arguments}} +{{#if (hasOldName (asUpperCamelCase parent.parent.name preserveAcronyms=true) command=(asUpperCamelCase parent.name preserveAcronyms=true) commandField=(asStructPropertyName label))}} + +{{> renamed_struct_field_impl cluster=parent.parent.name type=type newName=label oldName=(oldName (asUpperCamelCase parent.parent.name preserveAcronyms=true) command=(asUpperCamelCase parent.name preserveAcronyms=true) commandField=(asStructPropertyName label))}} +{{/if}} +{{/zcl_command_arguments}} @end {{/inline}} {{#if (not (wasRemoved (asUpperCamelCase parent.name preserveAcronyms=true) command=(asUpperCamelCase name preserveAcronyms=true)))}} {{> completeImpl cluster=(asUpperCamelCase parent.name preserveAcronyms=true) - command=(asUpperCamelCase name preserveAcronyms=true)}} + command=(asUpperCamelCase name preserveAcronyms=true) + includeRenamedProperties=false}} {{#if (or (not (isStrEqual (asUpperCamelCase parent.name preserveAcronyms=true) (compatClusterNameRemapping parent.name))) (not (isStrEqual (asUpperCamelCase name preserveAcronyms=true) (compatCommandNameRemapping parent.name name))))}} {{> oldNameImpl cluster=(compatClusterNameRemapping parent.name) command=(compatCommandNameRemapping parent.name name)}} +{{else if (hasRenamedFields (asUpperCamelCase parent.name preserveAcronyms=true) command=(asUpperCamelCase name preserveAcronyms=true))}} +{{#*inline "deprecatedImpl"}} + +@implementation MTR{{cluster}}Cluster{{command}}Params (Deprecated) +{{#zcl_command_arguments}} +{{#if (hasOldName ../cluster command=../command commandField=(asStructPropertyName label))}} + +{{> renamed_struct_field_impl cluster=parent.parent.name type=type newName=label oldName=(oldName ../cluster command=../command commandField=(asStructPropertyName label))}} +{{/if}} +{{/zcl_command_arguments}} +@end +{{/inline}} +{{> deprecatedImpl cluster=(asUpperCamelCase parent.name preserveAcronyms=true) + command=(asUpperCamelCase name preserveAcronyms=true)}} {{/if}} {{else}} {{> completeImpl cluster=(compatClusterNameRemapping parent.name) - command=(compatCommandNameRemapping parent.name name)}} + command=(compatCommandNameRemapping parent.name name) + includeRenamedProperties=true}} {{/if}} {{/zcl_commands}} {{/zcl_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt index 1143ec4e55b19c..5951653fec9fc7 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt @@ -14,9 +14,15 @@ NS_ASSUME_NONNULL_BEGIN @interface MTR{{cluster}}Cluster{{command}}Params : NSObject {{#zcl_command_arguments}} -{{! Override the getter name because some of our properties start with things - like "new" or "init" }} -@property (nonatomic, copy{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName label}} {{availability ../cluster command=../command commandField=(asStructPropertyName label)}}; +{{> struct_field_decl cluster=parent.parent.name type=type label=label}} {{availability ../cluster command=../command commandField=(asStructPropertyName label)}}; +{{#*inline "oldNameFieldDecl"}} + +{{> struct_field_decl cluster=parent.parent.name type=type label=commandField}} {{availability ../cluster command=../command commandField=commandField deprecationMessage=(concat "Please use " (asStructPropertyName label))}}; +{{/inline}} +{{#if (and includeRenamedProperties + (hasOldName ../cluster command=../command commandField=(asStructPropertyName label)))}} +{{> oldNameFieldDecl commandField=(oldName ../cluster command=../command commandField=(asStructPropertyName label))}} +{{/if}} {{/zcl_command_arguments}} {{#if (isStrEqual source "client")}} /** @@ -60,20 +66,48 @@ NS_ASSUME_NONNULL_BEGIN {{availability cluster command=command deprecationMessage=(concat "Please use MTR" (asUpperCamelCase parent.name preserveAcronyms=true) "Cluster" (asUpperCamelCase name preserveAcronyms=true) "Params")}} @interface MTR{{cluster}}Cluster{{command}}Params : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name}}Params +{{#zcl_command_arguments}} +{{#*inline "oldNameFieldDecl"}} + +{{> struct_field_decl cluster=parent.parent.name type=type label=commandField}} {{availability ../cluster command=../command commandField=commandField deprecationMessage=(concat "Please use " (asStructPropertyName label))}}; +{{/inline}} +{{#if (hasOldName (asUpperCamelCase parent.parent.name preserveAcronyms=true) command=(asUpperCamelCase parent.name preserveAcronyms=true) commandField=(asStructPropertyName label))}} +{{> oldNameFieldDecl commandField=(oldName (asUpperCamelCase parent.parent.name preserveAcronyms=true) command=(asUpperCamelCase parent.name preserveAcronyms=true) commandField=(asStructPropertyName label))}} +{{/if}} +{{/zcl_command_arguments}} @end {{/inline}} {{#if (not (wasRemoved (asUpperCamelCase parent.name preserveAcronyms=true) command=(asUpperCamelCase name preserveAcronyms=true)))}} {{> completeDecl cluster=(asUpperCamelCase parent.name preserveAcronyms=true) - command=(asUpperCamelCase name preserveAcronyms=true)}} + command=(asUpperCamelCase name preserveAcronyms=true) + includeRenamedProperties=false}} {{#if (or (not (isStrEqual (asUpperCamelCase parent.name preserveAcronyms=true) (compatClusterNameRemapping parent.name))) (not (isStrEqual (asUpperCamelCase name preserveAcronyms=true) (compatCommandNameRemapping parent.name name))))}} {{> oldNameDecl cluster=(compatClusterNameRemapping parent.name) command=(compatCommandNameRemapping parent.name name)}} +{{else if (hasRenamedFields (asUpperCamelCase parent.name preserveAcronyms=true) command=(asUpperCamelCase name preserveAcronyms=true))}} +{{#*inline "deprecatedDecl"}} + +@interface MTR{{cluster}}Cluster{{command}}Params (Deprecated) +{{#zcl_command_arguments}} +{{#*inline "oldNameFieldDecl"}} + +{{> struct_field_decl cluster=parent.parent.name type=type label=commandField}} {{availability ../cluster command=../command commandField=commandField deprecationMessage=(concat "Please use " (asStructPropertyName label))}}; +{{/inline}} +{{#if (hasOldName ../cluster command=../command commandField=(asStructPropertyName label))}} +{{> oldNameFieldDecl commandField=(oldName ../cluster command=../command commandField=(asStructPropertyName label))}} +{{/if}} +{{/zcl_command_arguments}} +@end +{{/inline}} +{{> deprecatedDecl cluster=(asUpperCamelCase parent.name preserveAcronyms=true) + command=(asUpperCamelCase name preserveAcronyms=true)}} {{/if}} {{else}} {{> completeDecl cluster=(compatClusterNameRemapping parent.name) - command=(compatCommandNameRemapping parent.name name)}} + command=(compatCommandNameRemapping parent.name name) + includeRenamedProperties=true}} {{/if}} {{/zcl_commands}} {{/zcl_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt index 625859d94b92dd..37c4f2af35a1c5 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt @@ -34,23 +34,35 @@ NS_ASSUME_NONNULL_BEGIN NSString *descriptionString = [NSString stringWithFormat:@"<%@: {{#zcl_struct_items}}{{asStructPropertyName label}}:%@; {{/zcl_struct_items}}>", NSStringFromClass([self class]){{#zcl_struct_items}},{{#if isArray}}_{{asStructPropertyName label}}{{else if (isOctetString type)}}[_{{asStructPropertyName label}} base64EncodedStringWithOptions:0]{{else}}_{{asStructPropertyName label}}{{/if}}{{/zcl_struct_items}}]; return descriptionString; } +{{#zcl_struct_items}} +{{#if (hasOldName (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(asStructPropertyName label))}} + +{{> renamed_struct_field_impl cluster=../../name type=type newName=label oldName=(oldName (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(asStructPropertyName label))}} +{{/if}} +{{/zcl_struct_items}} @end {{/inline}} {{> interfaceImpl interfaceName=(concat "MTR" (asUpperCamelCase parent.name preserveAcronyms=true) "Cluster" (asUpperCamelCase name preserveAcronyms=true))}} -{{!Backwards compat for now: Add a DeviceType thing that is API-compatible with DeviceTypeStruct. }} -{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}} -{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeStruct")}} -{{> interfaceImpl interfaceName="MTRDescriptorClusterDeviceType"}} -{{/if}} -{{else}} -{{#unless (isStrEqual (asUpperCamelCase parent.name preserveAcronyms=true) (compatClusterNameRemapping parent.name))}} -@implementation MTR{{compatClusterNameRemapping parent.name}}Cluster{{asUpperCamelCase name}} : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}} +{{! Takes the name of the struct to use as structName. }} +{{#*inline "oldNameImpl"}} +@implementation MTR{{compatClusterNameRemapping parent.name}}Cluster{{structName}} : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}} @end -{{/unless}} +{{/inline}} +{{! Takes the old name of the struct, if any, as oldStructName. }} +{{#*inline "oldNameCheck"}} +{{#if (or oldStructName + (hasOldName (asUpperCamelCase parent.name preserveAcronyms=true)))}} +{{#if oldStructName}} +{{> oldNameImpl structName=oldStructName}} +{{else}} +{{> oldNameImpl structName=(asUpperCamelCase name preserveAcronyms=true)}} +{{/if}} {{/if}} +{{/inline}} +{{> oldNameCheck oldStructName=(oldName (asUpperCamelCase parent.name preserveAcronyms=true) struct=(asUpperCamelCase name preserveAcronyms=true))}} {{/zcl_structs}} @@ -83,27 +95,31 @@ NS_ASSUME_NONNULL_BEGIN return descriptionString; } -{{#if (isStrEqual (asUpperCamelCase parent.name preserveAcronyms=true) "Switch")}} -{{#if (isStrEqual (asUpperCamelCase name preserveAcronyms=true) "MultiPressComplete")}} -{{! Workaround for the name being mis-spelled in XML previously }} -- (void)setNewPosition:(NSNumber * _Nonnull)newPosition -{ - self.previousPosition = newPosition; -} - -- (NSNumber * _Nonnull)newPosition -{ - return self.previousPosition; -} +{{#zcl_event_fields}} +{{#if (hasOldName (asUpperCamelCase ../parent.name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name))}} +{{> renamed_struct_field_impl cluster=../parent.name type=type newName=name oldName=(oldName (asUpperCamelCase ../parent.name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name))}} {{/if}} -{{/if}} +{{/zcl_event_fields}} @end -{{#unless (isStrEqual (asUpperCamelCase parent.name preserveAcronyms=true) (compatClusterNameRemapping parent.name))}} +{{! Takes the name of the event to use as eventName. }} +{{#*inline "oldNameDecl"}} -@implementation MTR{{compatClusterNameRemapping parent.name}}Cluster{{asUpperCamelCase name}}Event : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event +@implementation MTR{{compatClusterNameRemapping parent.name}}Cluster{{eventName}}Event : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event @end -{{/unless}} +{{/inline}} +{{! Takes the old name of the event, if any, as oldEventName. }} +{{#*inline "oldNameCheck"}} +{{#if (or oldEventName + (hasOldName (asUpperCamelCase parent.name preserveAcronyms=true)))}} +{{#if oldEventName}} +{{> oldNameDecl eventName=oldEventName}} +{{else}} +{{> oldNameDecl eventName=(asUpperCamelCase name preserveAcronyms=true)}} +{{/if}} +{{/if}} +{{/inline}} +{{> oldNameCheck oldEventName=(oldName (asUpperCamelCase parent.name preserveAcronyms=true) event=(asUpperCamelCase name preserveAcronyms=true))}} {{/zcl_events}} diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt index 4da179e81cf011..81a67ad8b972b7 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt @@ -7,55 +7,67 @@ NS_ASSUME_NONNULL_BEGIN {{#zcl_clusters}} {{#zcl_structs}} {{#*inline "interfaceDecl"}} -{{! Override the getter name because some of our properties start with things - like "new" or "init" }} {{#zcl_struct_items}} -@property (nonatomic, copy{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName label}} {{availability (asUpperCamelCase ../../name preserveAcronyms=true) struct=../struct structField=(asStructPropertyName label) deprecationMessage=(concat "Please use MTR" (asUpperCamelCase ../../name preserveAcronyms=true) "Cluster" (asUpperCamelCase ../name preserveAcronyms=true))}}; +{{> struct_field_decl cluster=parent.parent.name type=type label=label}} {{availability (asUpperCamelCase ../../name preserveAcronyms=true) struct=../struct structField=(asStructPropertyName label) deprecationMessage=(concat "Please use MTR" (asUpperCamelCase ../../name preserveAcronyms=true) "Cluster" (asUpperCamelCase ../name preserveAcronyms=true))}}; +{{#if (hasOldName (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(asStructPropertyName label))}} +{{> struct_field_decl cluster=../../name type=type label=(oldName (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(asStructPropertyName label))}} {{availability (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(oldName (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(asStructPropertyName name)) deprecationMessage=(concat "Please use " (asStructPropertyName name))}}; +{{/if}} {{/zcl_struct_items}} {{/inline}} -{{availability (asUpperCamelCase parent.name preserveAcronyms=true) struct=(asUpperCamelCase name preserveAcronyms=true)}} +{{availability (asUpperCamelCase parent.name preserveAcronyms=true) struct=(asUpperCamelCase name preserveAcronyms=true) deprecationMessage="This struct is unused and will be removed"}} @interface MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}} : NSObject {{> interfaceDecl struct=(asUpperCamelCase name preserveAcronyms=true)}} @end -{{!Backwards compat for now: Add a DeviceType thing that is API-compatible with DeviceTypeStruct. }} -{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}} -{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeStruct")}} -{{availability (asUpperCamelCase parent.name preserveAcronyms=true) struct="DeviceType" deprecationMessage="Please use MTRDescriptorClusterDeviceTypeStruct"}} -@interface MTRDescriptorClusterDeviceType : NSObject -{{> interfaceDecl struct="DeviceType"}} +{{! Takes the name of the struct to use as structName. }} +{{#*inline "oldNameDecl"}} +{{availability (compatClusterNameRemapping parent.name) struct=structName deprecationMessage=(concat "Please use MTR" (asUpperCamelCase parent.name preserveAcronyms=true) "Cluster" (asUpperCamelCase name preserveAcronyms=true))}} +@interface MTR{{compatClusterNameRemapping parent.name}}Cluster{{structName}} : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}} @end -{{/if}} +{{/inline}} +{{! Takes the old name of the struct, if any, as oldStructName. }} +{{#*inline "oldNameCheck"}} +{{#if (or oldStructName + (hasOldName (asUpperCamelCase parent.name preserveAcronyms=true)))}} +{{#if oldStructName}} +{{> oldNameDecl structName=oldStructName}} {{else}} -{{#unless (isStrEqual (asUpperCamelCase parent.name preserveAcronyms=true) (compatClusterNameRemapping parent.name))}} -{{availability (compatClusterNameRemapping parent.name) struct=(asUpperCamelCase name) deprecationMessage=(concat "Please use MTR" (asUpperCamelCase parent.name preserveAcronyms=true) "Cluster" (asUpperCamelCase name preserveAcronyms=true))}} -@interface MTR{{compatClusterNameRemapping parent.name}}Cluster{{asUpperCamelCase name}} : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name}} -@end -{{/unless}} +{{> oldNameDecl structName=(asUpperCamelCase name preserveAcronyms=true)}} {{/if}} +{{/if}} +{{/inline}} +{{> oldNameCheck oldStructName=(oldName (asUpperCamelCase parent.name preserveAcronyms=true) struct=(asUpperCamelCase name preserveAcronyms=true))}} {{/zcl_structs}} {{#zcl_events}} {{availability (asUpperCamelCase parent.name preserveAcronyms=true) event=(asUpperCamelCase name preserveAcronyms=true)}} @interface MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event : NSObject {{#zcl_event_fields}} -@property (nonatomic, copy{{#unless (isStrEqual (asGetterName name) (asStructPropertyName name))}}, getter={{asGetterName name}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName name}} {{availability (asUpperCamelCase ../../name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name)}}; -{{#if (isStrEqual (asUpperCamelCase ../parent.name preserveAcronyms=true) "Switch")}} -{{#if (isStrEqual (asUpperCamelCase ../name preserveAcronyms=true) "MultiPressComplete")}} -{{#if (isStrEqual (asStructPropertyName name) "previousPosition")}} -{{! Workaround for the name being mis-spelled in XML previously }} -@property (nonatomic, copy) NSNumber * _Nonnull newPosition {{availability (asUpperCamelCase ../../name preserveAcronyms=true) event=(asUpperCamelCase ../name) eventField="newPosition" deprecationMessage="Please use previousPosition"}}; -{{/if}} -{{/if}} +{{> struct_field_decl cluster=parent.parent.name type=type label=name}} {{availability (asUpperCamelCase ../../name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name)}}; +{{#if (hasOldName (asUpperCamelCase ../parent.name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name))}} +{{> struct_field_decl cluster=parent.parent.name type=type label=(oldName (asUpperCamelCase ../parent.name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name))}} {{availability (asUpperCamelCase ../../name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(oldName (asUpperCamelCase ../parent.name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name)) deprecationMessage=(concat "Please use " (asStructPropertyName name))}}; {{/if}} {{/zcl_event_fields}} @end -{{#unless (isStrEqual (asUpperCamelCase parent.name preserveAcronyms=true) (compatClusterNameRemapping parent.name))}} +{{! Takes the name of the event to use as eventName. }} +{{#*inline "oldNameDecl"}} -{{availability (compatClusterNameRemapping parent.name) event=(asUpperCamelCase name) deprecationMessage=(concat "Please use MTR" (asUpperCamelCase parent.name preserveAcronyms=true) "Cluster" (asUpperCamelCase name preserveAcronyms=true) "Event")}} -@interface MTR{{compatClusterNameRemapping parent.name}}Cluster{{asUpperCamelCase name}}Event : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event +{{availability (compatClusterNameRemapping parent.name) event=eventName deprecationMessage=(concat "Please use MTR" (asUpperCamelCase parent.name preserveAcronyms=true) "Cluster" (asUpperCamelCase name preserveAcronyms=true) "Event")}} +@interface MTR{{compatClusterNameRemapping parent.name}}Cluster{{eventName}}Event : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event @end -{{/unless}} +{{/inline}} +{{! Takes the old name of the event, if any, as oldEventName. }} +{{#*inline "oldNameCheck"}} +{{#if (or oldEventName + (hasOldName (asUpperCamelCase parent.name preserveAcronyms=true)))}} +{{#if oldEventName}} +{{> oldNameDecl eventName=oldEventName}} +{{else}} +{{> oldNameDecl eventName=(asUpperCamelCase name preserveAcronyms=true)}} +{{/if}} +{{/if}} +{{/inline}} +{{> oldNameCheck oldEventName=(oldName (asUpperCamelCase parent.name preserveAcronyms=true) event=(asUpperCamelCase name preserveAcronyms=true))}} {{/zcl_events}} diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 003b30f58a77e4..010bddd35779d5 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -4542,6 +4542,10 @@ attributes: Descriptor: - DeviceTypeList + renames: + structs: + Descriptor: + DeviceTypeStruct: DeviceType - release: "First major API revamp" versions: "future" @@ -4669,7 +4673,7 @@ - FeatureMap - ClusterRevision OTASoftwareUpdateRequestor: - - DefaultOtaProviders + - DefaultOTAProviders - UpdatePossible - UpdateState - UpdateStateProgress @@ -4719,7 +4723,7 @@ - ApplyUpdateResponse - NotifyUpdateApplied OTASoftwareUpdateRequestor: - - AnnounceOtaProvider + - AnnounceOTAProvider UnitTesting: - Test - TestSpecificResponse @@ -4876,8 +4880,8 @@ - arg1 OTASoftwareUpdateProvider: QueryImage: - - vendorId - - productId + - vendorID + - productID - softwareVersion - protocolsSupported - hardwareVersion @@ -4903,9 +4907,9 @@ - updateToken - softwareVersion OTASoftwareUpdateRequestor: - AnnounceOtaProvider: - - providerNodeId - - vendorId + AnnounceOTAProvider: + - providerNodeID + - vendorID - announcementReason - metadataForNode - endpoint @@ -4913,6 +4917,24 @@ RegisterClientMonitoring: - clientNodeId - iCid + Groups: + AddGroup: + - groupID + AddGroupIfIdentifying: + - groupID + AddGroupResponse: + - groupID + RemoveGroup: + - groupID + RemoveGroupResponse: + - groupID + ViewGroup: + - groupID + ViewGroupResponse: + - groupID + OnOff: + OffWithEffect: + - effectIdentifier structs: OTASoftwareUpdateRequestor: - ProviderLocation @@ -4928,6 +4950,9 @@ - MonitoringRegistration BasicInformation: - CapabilityMinimaStruct + AccessControl: + - AccessControlEntryStruct + - AccessControlExtensionStruct struct fields: UnitTesting: SimpleStruct: @@ -4992,6 +5017,19 @@ CapabilityMinimaStruct: - caseSessionsPerFabric - subscriptionsPerFabric + Descriptor: + DeviceTypeStruct: + - deviceType + AccessControl: + AccessControlEntryStruct: + - privilege + - authMode + - subjects + - targets + - fabricIndex + AccessControlExtensionStruct: + - data + - fabricIndex events: OTASoftwareUpdateRequestor: - StateTransition @@ -5051,6 +5089,9 @@ - OTAUpdateStateEnum UnitTesting: - SimpleEnum + AccessControl: + - AccessControlEntryPrivilegeEnum + - AccessControlEntryAuthModeEnum enum values: OTASoftwareUpdateProvider: OTAApplyUpdateAction: @@ -5094,6 +5135,20 @@ - ValueA - ValueB - ValueC + GeneralCommissioning: + CommissioningError: + - OK + AccessControl: + AccessControlEntryPrivilegeEnum: + - View + - ProxyView + - Operate + - Manage + - Administer + AccessControlEntryAuthModeEnum: + - PASE + - CASE + - Group bitmaps: UnitTesting: - Bitmap8MaskMap @@ -5149,13 +5204,47 @@ - PirOccupiedToUnoccupiedDelay - PirUnoccupiedToOccupiedDelay - PirUnoccupiedToOccupiedThreshold + command fields: + Groups: + AddGroup: + - groupId + AddGroupIfIdentifying: + - groupId + AddGroupResponse: + - groupId + RemoveGroup: + - groupId + RemoveGroupResponse: + - groupId + ViewGroup: + - groupId + ViewGroupResponse: + - groupId + OnOff: + OffWithEffect: + - effectId structs: Descriptor: - DeviceType + AccessControl: + - AccessControlEntry + - ExtensionEntry + struct fields: + Descriptor: + DeviceTypeStruct: + - type event fields: Switch: MultiPressComplete: - newPosition + enums: + AccessControl: + - Privilege + - AuthMode + enum values: + GeneralCommissioning: + CommissioningError: + - Ok apis: - Timed Invoke for server to client commands - Deprecated global attribute names @@ -5179,3 +5268,55 @@ PIROccupiedToUnoccupiedDelay: PirOccupiedToUnoccupiedDelay PIRUnoccupiedToOccupiedDelay: PirUnoccupiedToOccupiedDelay PIRUnoccupiedToOccupiedThreshold: PirUnoccupiedToOccupiedThreshold + OTASoftwareUpdateRequestor: + DefaultOTAProviders: DefaultOtaProviders + commands: + OTASoftwareUpdateRequestor: + AnnounceOTAProvider: AnnounceOtaProvider + command fields: + OTASoftwareUpdateProvider: + QueryImage: + vendorID: vendorId + productID: productId + OTASoftwareUpdateRequestor: + AnnounceOTAProvider: + providerNodeID: providerNodeId + vendorID: vendorId + Groups: + AddGroup: + groupID: groupId + AddGroupIfIdentifying: + groupID: groupId + AddGroupResponse: + groupID: groupId + RemoveGroup: + groupID: groupId + RemoveGroupResponse: + groupID: groupId + ViewGroup: + groupID: groupId + ViewGroupResponse: + groupID: groupId + OnOff: + OffWithEffect: + effectIdentifier: effectId + structs: + AccessControl: + AccessControlEntryStruct: AccessControlEntry + AccessControlExtensionStruct: ExtensionEntry + struct fields: + Descriptor: + DeviceTypeStruct: + deviceType: type + event fields: + Switch: + MultiPressComplete: + previousPosition: newPosition + enums: + AccessControl: + AccessControlEntryPrivilegeEnum: Privilege + AccessControlEntryAuthModeEnum: AuthMode + enum values: + GeneralCommissioning: + CommissioningError: + OK: Ok diff --git a/src/darwin/Framework/CHIP/templates/partials/renamed_struct_field_impl.zapt b/src/darwin/Framework/CHIP/templates/partials/renamed_struct_field_impl.zapt new file mode 100644 index 00000000000000..2bd52e82f6701b --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/partials/renamed_struct_field_impl.zapt @@ -0,0 +1,9 @@ +- (void)set{{asUpperCamelCase oldName}}:({{asObjectiveCType type cluster}}){{asStructPropertyName oldName}} +{ + self.{{asStructPropertyName newName}} = {{asStructPropertyName oldName}}; +} + +- ({{asObjectiveCType type cluster}}){{asGetterName oldName}} +{ + return self.{{asStructPropertyName newName}}; +} diff --git a/src/darwin/Framework/CHIP/templates/partials/struct_field_decl.zapt b/src/darwin/Framework/CHIP/templates/partials/struct_field_decl.zapt new file mode 100644 index 00000000000000..c5e398facaaf35 --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/partials/struct_field_decl.zapt @@ -0,0 +1,3 @@ +{{! Override the getter name because some of our properties start with things + like "new" or "init" }} +@property (nonatomic, copy{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type cluster}} {{asStructPropertyName label}} {{! Caller provides availability~}} diff --git a/src/darwin/Framework/CHIP/templates/templates.json b/src/darwin/Framework/CHIP/templates/templates.json index 819b0b55022539..6561d17ee5c715 100644 --- a/src/darwin/Framework/CHIP/templates/templates.json +++ b/src/darwin/Framework/CHIP/templates/templates.json @@ -42,6 +42,14 @@ { "name": "attribute_data_callback_name", "path": "partials/attribute_data_callback_name.zapt" + }, + { + "name": "struct_field_decl", + "path": "partials/struct_field_decl.zapt" + }, + { + "name": "renamed_struct_field_impl", + "path": "partials/renamed_struct_field_impl.zapt" } ], "templates": [ diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 9ef4237dbf3194..eeaace2ac88f61 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -1274,7 +1274,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto & entry_0 = iter_0.GetValue(); MTRDescriptorClusterDeviceTypeStruct * newElement_0; newElement_0 = [MTRDescriptorClusterDeviceTypeStruct new]; - newElement_0.type = [NSNumber numberWithUnsignedInt:entry_0.type]; + newElement_0.deviceType = [NSNumber numberWithUnsignedInt:entry_0.deviceType]; newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; [array_0 addObject:newElement_0]; } @@ -1643,8 +1643,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRAccessControlClusterAccessControlEntry * newElement_0; - newElement_0 = [MTRAccessControlClusterAccessControlEntry new]; + MTRAccessControlClusterAccessControlEntryStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlEntryStruct new]; newElement_0.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.privilege)]; newElement_0.authMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.authMode)]; if (entry_0.subjects.IsNull()) { @@ -1727,8 +1727,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRAccessControlClusterExtensionEntry * newElement_0; - newElement_0 = [MTRAccessControlClusterExtensionEntry new]; + MTRAccessControlClusterAccessControlExtensionStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlExtensionStruct new]; newElement_0.data = [NSData dataWithBytes:entry_0.data.data() length:entry_0.data.size()]; newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; @@ -2525,8 +2525,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & case Clusters::OtaSoftwareUpdateRequestor::Id: { using namespace Clusters::OtaSoftwareUpdateRequestor; switch (aPath.mAttributeId) { - case Attributes::DefaultOtaProviders::Id: { - using TypeInfo = Attributes::DefaultOtaProviders::TypeInfo; + case Attributes::DefaultOTAProviders::Id: { + using TypeInfo = Attributes::DefaultOTAProviders::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index eabcb977d98501..c433a209131c12 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -2400,26 +2400,26 @@ MTR_NEWLY_AVAILABLE queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; /** - * Command AnnounceOtaProvider + * Command AnnounceOTAProvider * * Announce the presence of an OTA Provider */ -- (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params +- (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params +- (void)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeDefaultOtaProvidersWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeDefaultOTAProvidersWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeDefaultOtaProvidersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeDefaultOTAProvidersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, @@ -17124,11 +17124,49 @@ typedef NS_OPTIONS(uint8_t, MTRLevelControlOptions) { MTRLevelControlOptionsCoupleColorTempToLevel MTR_NEWLY_AVAILABLE = 0x2, } MTR_NEWLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRAccessControlEntryAuthMode) { + MTRAccessControlEntryAuthModePASE MTR_NEWLY_AVAILABLE = 0x01, + MTRAccessControlEntryAuthModeCASE MTR_NEWLY_AVAILABLE = 0x02, + MTRAccessControlEntryAuthModeGroup MTR_NEWLY_AVAILABLE = 0x03, +} MTR_NEWLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRAccessControlAuthMode) { - MTRAccessControlAuthModePASE API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRAccessControlAuthModeCASE API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRAccessControlAuthModeGroup API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRAccessControlAuthModePASE API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRAccessControlEntryAuthModePASE") + = 0x01, + MTRAccessControlAuthModeCASE API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRAccessControlEntryAuthModeCASE") + = 0x02, + MTRAccessControlAuthModeGroup API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRAccessControlEntryAuthModeGroup") + = 0x03, +} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use MTRAccessControlEntryAuthMode"); + +typedef NS_ENUM(uint8_t, MTRAccessControlEntryPrivilege) { + MTRAccessControlEntryPrivilegeView MTR_NEWLY_AVAILABLE = 0x01, + MTRAccessControlEntryPrivilegeProxyView MTR_NEWLY_AVAILABLE = 0x02, + MTRAccessControlEntryPrivilegeOperate MTR_NEWLY_AVAILABLE = 0x03, + MTRAccessControlEntryPrivilegeManage MTR_NEWLY_AVAILABLE = 0x04, + MTRAccessControlEntryPrivilegeAdminister MTR_NEWLY_AVAILABLE = 0x05, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRAccessControlPrivilege) { + MTRAccessControlPrivilegeView API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRAccessControlEntryPrivilegeView") + = 0x01, + MTRAccessControlPrivilegeProxyView API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRAccessControlEntryPrivilegeProxyView") + = 0x02, + MTRAccessControlPrivilegeOperate API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRAccessControlEntryPrivilegeOperate") + = 0x03, + MTRAccessControlPrivilegeManage API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRAccessControlEntryPrivilegeManage") + = 0x04, + MTRAccessControlPrivilegeAdminister API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRAccessControlEntryPrivilegeAdminister") + = 0x05, +} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use MTRAccessControlEntryPrivilege"); typedef NS_ENUM(uint8_t, MTRAccessControlChangeType) { MTRAccessControlChangeTypeChanged API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, @@ -17136,14 +17174,6 @@ typedef NS_ENUM(uint8_t, MTRAccessControlChangeType) { MTRAccessControlChangeTypeRemoved API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_ENUM(uint8_t, MTRAccessControlPrivilege) { - MTRAccessControlPrivilegeView API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRAccessControlPrivilegeProxyView API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRAccessControlPrivilegeOperate API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRAccessControlPrivilegeManage API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRAccessControlPrivilegeAdminister API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - typedef NS_ENUM(uint8_t, MTRActionsActionError) { MTRActionsActionErrorUnknown API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRActionsActionErrorInterrupted API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, @@ -17437,7 +17467,10 @@ typedef NS_OPTIONS(uint32_t, MTRPowerSourceFeature) { } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRGeneralCommissioningCommissioningError) { - MTRGeneralCommissioningCommissioningErrorOk API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRGeneralCommissioningCommissioningErrorOK MTR_NEWLY_AVAILABLE = 0x00, + MTRGeneralCommissioningCommissioningErrorOk API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRGeneralCommissioningCommissioningErrorOK") + = 0x00, MTRGeneralCommissioningCommissioningErrorValueOutsideRange API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, MTRGeneralCommissioningCommissioningErrorInvalidAuthentication API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -21970,21 +22003,21 @@ typedef NS_ENUM(uint8_t, MTRFaultInjectionFaultType) { - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params completionHandler:(MTRStatusCompletion)completionHandler API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use announceOtaProviderWithParams:completion:"); + MTR_NEWLY_DEPRECATED("Please use announceOTAProviderWithParams:completion:"); - (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use readAttributeDefaultOtaProvidersWithParams:completion:"); + MTR_NEWLY_DEPRECATED("Please use readAttributeDefaultOTAProvidersWithParams:completion:"); - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use writeAttributeDefaultOtaProvidersWithValue:completion:"); + MTR_NEWLY_DEPRECATED("Please use writeAttributeDefaultOTAProvidersWithValue:completion:"); - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use writeAttributeDefaultOtaProvidersWithValue:params:completion:"); + MTR_NEWLY_DEPRECATED("Please use writeAttributeDefaultOTAProvidersWithValue:params:completion:"); - (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params @@ -21993,14 +22026,14 @@ typedef NS_ENUM(uint8_t, MTRFaultInjectionFaultType) { reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDefaultOtaProvidersWithParams:subscriptionEstablished:"); + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDefaultOTAProvidersWithParams:subscriptionEstablished:"); + (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use readAttributeDefaultOtaProvidersWithAttributeCache:endpoint:queue:completion:"); + MTR_NEWLY_DEPRECATED("Please use readAttributeDefaultOTAProvidersWithAttributeCache:endpoint:queue:completion:"); - (void)readAttributeUpdatePossibleWithCompletionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index e71dfa07d76a21..93619cc8647e50 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -822,7 +822,7 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; return MTRStartInvokeInteraction( @@ -849,7 +849,7 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; return MTRStartInvokeInteraction( typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); @@ -923,7 +923,7 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; return MTRStartInvokeInteraction( typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); @@ -984,7 +984,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; return MTRStartInvokeInteraction( @@ -3226,7 +3226,8 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params com timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.effectId = static_cast>(params.effectId.unsignedCharValue); + request.effectIdentifier = static_cast>( + params.effectIdentifier.unsignedCharValue); request.effectVariant = static_cast>(params.effectVariant.unsignedCharValue); @@ -10483,11 +10484,11 @@ - (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value } listFreer.add(listHolder_0); for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRAccessControlClusterAccessControlEntry class]]) { + if (![value[i_0] isKindOfClass:[MTRAccessControlClusterAccessControlEntryStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (MTRAccessControlClusterAccessControlEntry *) value[i_0]; + auto element_0 = (MTRAccessControlClusterAccessControlEntryStruct *) value[i_0]; listHolder_0->mList[i_0].privilege = static_castmList[i_0].privilege)>>( element_0.privilege.unsignedCharValue); @@ -10662,11 +10663,11 @@ - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value } listFreer.add(listHolder_0); for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRAccessControlClusterExtensionEntry class]]) { + if (![value[i_0] isKindOfClass:[MTRAccessControlClusterAccessControlExtensionStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (MTRAccessControlClusterExtensionEntry *) value[i_0]; + auto element_0 = (MTRAccessControlClusterAccessControlExtensionStruct *) value[i_0]; listHolder_0->mList[i_0].data = [self asByteSpan:element_0.data]; listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } @@ -15152,8 +15153,8 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.vendorId = static_cast>(params.vendorId.unsignedShortValue); - request.productId = params.productId.unsignedShortValue; + request.vendorID = static_cast>(params.vendorID.unsignedShortValue); + request.productID = params.productID.unsignedShortValue; request.softwareVersion = params.softwareVersion.unsignedIntValue; { using ListType_0 = std::remove_reference_t; @@ -15758,7 +15759,7 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params +- (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. @@ -15773,14 +15774,14 @@ - (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou auto * typedBridge = static_cast(bridge); chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type request; + OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.providerNodeId = params.providerNodeId.unsignedLongLongValue; - request.vendorId = static_cast>(params.vendorId.unsignedShortValue); + request.providerNodeID = params.providerNodeID.unsignedLongLongValue; + request.vendorID = static_cast>(params.vendorID.unsignedShortValue); request.announcementReason = static_cast>( params.announcementReason.unsignedCharValue); if (params.metadataForNode != nil) { @@ -15795,21 +15796,21 @@ - (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params +- (void)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { @@ -15832,7 +15833,7 @@ - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value } ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; TypeInfo::Type cppValue; { using ListType_0 = std::remove_reference_t; @@ -15865,29 +15866,29 @@ - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeDefaultOtaProvidersWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeDefaultOTAProvidersWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeDefaultOtaProvidersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeDefaultOTAProvidersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(OTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -16267,13 +16268,13 @@ @implementation MTRBaseClusterOtaSoftwareUpdateRequestor (Deprecated) - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self announceOtaProviderWithParams:params completion:completionHandler]; + [self announceOTAProviderWithParams:params completion:completionHandler]; } - (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDefaultOtaProvidersWithParams:params + [self readAttributeDefaultOTAProvidersWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); @@ -16282,13 +16283,13 @@ - (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)pa - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeDefaultOtaProvidersWithValue:value params:nil completion:completionHandler]; + [self writeAttributeDefaultOTAProvidersWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeDefaultOtaProvidersWithValue:value params:params completion:completionHandler]; + [self writeAttributeDefaultOTAProvidersWithValue:value params:params completion:completionHandler]; } - (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -16305,7 +16306,7 @@ - (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDefaultOtaProvidersWithParams:subscribeParams + [self subscribeAttributeDefaultOTAProvidersWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. @@ -16318,7 +16319,7 @@ + (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheCon completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDefaultOtaProvidersWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeDefaultOTAProvidersWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSArray * _Nullable value, NSError * _Nullable error) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index 1bfbf12ff47c8d..d4be5addf9050e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -168,15 +168,17 @@ typedef void (*NullableLevelControlClusterMoveModeAttributeCallback)( typedef void (*LevelControlClusterStepModeAttributeCallback)(void *, chip::app::Clusters::LevelControl::StepMode); typedef void (*NullableLevelControlClusterStepModeAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*AccessControlClusterAuthModeAttributeCallback)(void *, chip::app::Clusters::AccessControl::AuthMode); -typedef void (*NullableAccessControlClusterAuthModeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); +typedef void (*AccessControlClusterAccessControlEntryAuthModeEnumAttributeCallback)( + void *, chip::app::Clusters::AccessControl::AccessControlEntryAuthModeEnum); +typedef void (*NullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*AccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallback)( + void *, chip::app::Clusters::AccessControl::AccessControlEntryPrivilegeEnum); +typedef void (*NullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*AccessControlClusterChangeTypeEnumAttributeCallback)(void *, chip::app::Clusters::AccessControl::ChangeTypeEnum); typedef void (*NullableAccessControlClusterChangeTypeEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*AccessControlClusterPrivilegeAttributeCallback)(void *, chip::app::Clusters::AccessControl::Privilege); -typedef void (*NullableAccessControlClusterPrivilegeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); typedef void (*ActionsClusterActionErrorEnumAttributeCallback)(void *, chip::app::Clusters::Actions::ActionErrorEnum); typedef void (*NullableActionsClusterActionErrorEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); @@ -603,11 +605,12 @@ typedef void (*BindingAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlACLListAttributeCallback)( void * context, - const chip::app::DataModel::DecodableList & - data); + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & data); typedef void (*AccessControlExtensionListAttributeCallback)( void * context, - const chip::app::DataModel::DecodableList & data); + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & data); typedef void (*AccessControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAcceptedCommandListListAttributeCallback)( @@ -640,7 +643,7 @@ typedef void (*OTASoftwareUpdateProviderAcceptedCommandListListAttributeCallback void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateProviderAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallback)( +typedef void (*OTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & data); @@ -3017,10 +3020,9 @@ class MTRAccessControlACLListAttributeCallbackBridge : public MTRCallbackBridge< MTRAccessControlACLListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::DecodableList & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & value); }; class MTRAccessControlACLListAttributeCallbackSubscriptionBridge : public MTRAccessControlACLListAttributeCallbackBridge @@ -3050,10 +3052,9 @@ class MTRAccessControlExtensionListAttributeCallbackBridge : public MTRCallbackB MTRAccessControlExtensionListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::DecodableList & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & value); }; class MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge : public MTRAccessControlExtensionListAttributeCallbackBridge @@ -3567,16 +3568,16 @@ class MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackSubscription MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -3584,20 +3585,20 @@ class MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridg chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & value); }; -class MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge +class MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackSubscriptionBridge + : public MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge { public: - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( + MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(queue, handler, action), + MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge::OnDone; + using MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12233,201 +12234,214 @@ class MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAccessControlClusterAuthModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRAccessControlClusterAuthModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAccessControlClusterAuthModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::AuthMode value); + static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::AccessControlEntryAuthModeEnum value); }; -class MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge - : public MTRAccessControlClusterAuthModeAttributeCallbackBridge +class MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge + : public MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge { public: - MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlClusterAuthModeAttributeCallbackBridge(queue, handler, action), + MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRAccessControlClusterAuthModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAccessControlClusterAuthModeAttributeCallbackBridge::OnDone; + using MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge - : public MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge +class MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge { public: - MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge( + MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(queue, handler, action), + MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge::OnDone; + using MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::ChangeTypeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::AccessControlEntryPrivilegeEnum value); }; -class MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge - : public MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge +class MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge + : public MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge { public: - MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; + using MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge +class MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge { public: - MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge( + MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; + using MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAccessControlClusterPrivilegeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRAccessControlClusterPrivilegeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAccessControlClusterPrivilegeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::Privilege value); + static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::ChangeTypeEnum value); }; -class MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge - : public MTRAccessControlClusterPrivilegeAttributeCallbackBridge +class MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge + : public MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge { public: - MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlClusterPrivilegeAttributeCallbackBridge(queue, handler, action), + MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRAccessControlClusterPrivilegeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAccessControlClusterPrivilegeAttributeCallbackBridge::OnDone; + using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge - : public MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge +class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge { public: - MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge( + MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(queue, handler, action), + MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge::OnDone; + using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 0007d4521ef695..a77aee371cc2aa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -1535,7 +1535,7 @@ auto & entry_0 = iter_0.GetValue(); MTRDescriptorClusterDeviceTypeStruct * newElement_0; newElement_0 = [MTRDescriptorClusterDeviceTypeStruct new]; - newElement_0.type = [NSNumber numberWithUnsignedInt:entry_0.type]; + newElement_0.deviceType = [NSNumber numberWithUnsignedInt:entry_0.deviceType]; newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; [array_0 addObject:newElement_0]; } @@ -1966,8 +1966,8 @@ } void MTRAccessControlACLListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1975,8 +1975,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRAccessControlClusterAccessControlEntry * newElement_0; - newElement_0 = [MTRAccessControlClusterAccessControlEntry new]; + MTRAccessControlClusterAccessControlEntryStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlEntryStruct new]; newElement_0.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.privilege)]; newElement_0.authMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.authMode)]; if (entry_0.subjects.IsNull()) { @@ -2063,7 +2063,8 @@ } void MTRAccessControlExtensionListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2071,8 +2072,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRAccessControlClusterExtensionEntry * newElement_0; - newElement_0 = [MTRAccessControlClusterExtensionEntry new]; + MTRAccessControlClusterAccessControlExtensionStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlExtensionStruct new]; newElement_0.data = [NSData dataWithBytes:entry_0.data.data() length:entry_0.data.size()]; newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; @@ -2688,7 +2689,7 @@ } } -void MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge::OnSuccessFn(void * context, +void MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & value) { @@ -2715,7 +2716,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11262,7 +11263,7 @@ response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.groupID = [NSNumber numberWithUnsignedShort:data.groupID]; } DispatchSuccess(context, response); }; @@ -11275,7 +11276,7 @@ response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.groupID = [NSNumber numberWithUnsignedShort:data.groupID]; } { response.groupName = [[NSString alloc] initWithBytes:data.groupName.data() @@ -11325,7 +11326,7 @@ response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.groupID = [NSNumber numberWithUnsignedShort:data.groupID]; } DispatchSuccess(context, response); }; @@ -13506,15 +13507,15 @@ } } -void MTRAccessControlClusterAuthModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::AccessControl::AuthMode value) +void MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::AccessControl::AccessControlEntryAuthModeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -13529,8 +13530,8 @@ } } -void MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -13541,7 +13542,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -13556,15 +13557,15 @@ } } -void MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::AccessControl::ChangeTypeEnum value) +void MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::AccessControl::AccessControlEntryPrivilegeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -13579,8 +13580,8 @@ } } -void MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -13591,7 +13592,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -13606,15 +13607,15 @@ } } -void MTRAccessControlClusterPrivilegeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::AccessControl::Privilege value) +void MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::AccessControl::ChangeTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -13629,8 +13630,8 @@ } } -void MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -13641,7 +13642,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::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 495b63ae9a3c24..53942f6a40012c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -1024,7 +1024,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster OtaSoftwareUpdateRequestor deprecated attribute names MTRClusterOtaSoftwareUpdateRequestorAttributeDefaultOtaProvidersID API_AVAILABLE( ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOtaProvidersID") + MTR_NEWLY_DEPRECATED("Please use MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID") = 0x00000000, MTRClusterOtaSoftwareUpdateRequestorAttributeUpdatePossibleID API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdatePossibleID") @@ -1055,7 +1055,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRClusterGlobalAttributeClusterRevisionID, // Cluster OTASoftwareUpdateRequestor attributes - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOtaProvidersID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID MTR_NEWLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdatePossibleID MTR_NEWLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateID MTR_NEWLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateProgressID MTR_NEWLY_AVAILABLE = 0x00000003, @@ -5886,11 +5886,11 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { // Cluster OtaSoftwareUpdateRequestor deprecated command id names MTRClusterOtaSoftwareUpdateRequestorCommandAnnounceOtaProviderID API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRCommandIDTypeClusterOTASoftwareUpdateRequestorCommandAnnounceOtaProviderID") + MTR_NEWLY_DEPRECATED("Please use MTRCommandIDTypeClusterOTASoftwareUpdateRequestorCommandAnnounceOTAProviderID") = 0x00000000, // Cluster OTASoftwareUpdateRequestor commands - MTRCommandIDTypeClusterOTASoftwareUpdateRequestorCommandAnnounceOtaProviderID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterOTASoftwareUpdateRequestorCommandAnnounceOTAProviderID MTR_NEWLY_AVAILABLE = 0x00000000, // Cluster GeneralCommissioning deprecated command id names MTRClusterGeneralCommissioningCommandArmFailSafeID API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 17144eb969ef5d..d2c390fd1d0968 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -1019,15 +1019,15 @@ MTR_NEWLY_AVAILABLE endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params +- (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (NSDictionary *)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary *)dataValueDictionary +- (NSDictionary *)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; @@ -7114,7 +7114,19 @@ MTR_NEWLY_DEPRECATED("Please use MTRClusterUnitTesting") expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use announceOtaProviderWithParams:expectedValues:expectedValueIntervalMs:completion:"); + MTR_NEWLY_DEPRECATED("Please use announceOTAProviderWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (NSDictionary *)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use readAttributeDefaultOTAProvidersWithParams on MTRClusterOTASoftwareUpdateRequestor"); +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use writeAttributeDefaultOTAProvidersWithValue on MTRClusterOTASoftwareUpdateRequestor"); +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use writeAttributeDefaultOTAProvidersWithValue on MTRClusterOTASoftwareUpdateRequestor"); @end @interface MTRClusterLocalizationConfiguration (Deprecated) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 5db9b7beaa312b..218565e36c7bdc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -343,7 +343,7 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -402,7 +402,7 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); @@ -541,7 +541,7 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); @@ -663,7 +663,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -2074,8 +2074,8 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } - request.effectId - = static_cast>(params.effectId.unsignedCharValue); + request.effectIdentifier = static_cast>( + params.effectIdentifier.unsignedCharValue); request.effectVariant = static_cast>(params.effectVariant.unsignedCharValue); @@ -5533,9 +5533,9 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } - request.vendorId - = static_cast>(params.vendorId.unsignedShortValue); - request.productId = params.productId.unsignedShortValue; + request.vendorID + = static_cast>(params.vendorID.unsignedShortValue); + request.productID = params.productID.unsignedShortValue; request.softwareVersion = params.softwareVersion.unsignedIntValue; { using ListType_0 = std::remove_reference_t; @@ -5826,14 +5826,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi return self; } -- (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params +- (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams *)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) MTRClusterIDTypeOTASoftwareUpdateRequestorID, - (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateRequestorCommandAnnounceOtaProviderID]; + (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateRequestorCommandAnnounceOTAProviderID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -5858,13 +5858,13 @@ - (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type request; + OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } - request.providerNodeId = params.providerNodeId.unsignedLongLongValue; - request.vendorId - = static_cast>(params.vendorId.unsignedShortValue); + request.providerNodeID = params.providerNodeID.unsignedLongLongValue; + request.vendorID + = static_cast>(params.vendorID.unsignedShortValue); request.announcementReason = static_cast>( params.announcementReason.unsignedCharValue); if (params.metadataForNode != nil) { @@ -5892,21 +5892,21 @@ - (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou } } -- (NSDictionary *)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOtaProvidersID) + attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) params:params]; } -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributeDefaultOtaProvidersWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributeDefaultOTAProvidersWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { @@ -5914,7 +5914,7 @@ - (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary [self.device writeAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOtaProvidersID) + attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -6004,11 +6004,28 @@ - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnou expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self announceOtaProviderWithParams:params + [self announceOTAProviderWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; } +- (NSDictionary *)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params +{ + return [self readAttributeDefaultOTAProvidersWithParams:params]; +} +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDefaultOTAProvidersWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; +} +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + [self writeAttributeDefaultOTAProvidersWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:params]; +} @end @implementation MTRClusterLocalizationConfiguration diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 60c09f8547bdf4..333de93093941f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -67,7 +67,7 @@ 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 MTRGroupsClusterAddGroupParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSString * _Nonnull groupName API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** @@ -87,12 +87,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; @end +@interface MTRGroupsClusterAddGroupParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRGroupsClusterAddGroupResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -111,10 +117,16 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRGroupsClusterAddGroupResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRGroupsClusterViewGroupParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -132,12 +144,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; @end +@interface MTRGroupsClusterViewGroupParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRGroupsClusterViewGroupResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSString * _Nonnull groupName API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** @@ -158,6 +176,12 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRGroupsClusterViewGroupResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRGroupsClusterGetGroupMembershipParams : NSObject @@ -206,7 +230,7 @@ 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 MTRGroupsClusterRemoveGroupParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -224,12 +248,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; @end +@interface MTRGroupsClusterRemoveGroupParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRGroupsClusterRemoveGroupResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -248,6 +278,12 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRGroupsClusterRemoveGroupResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRGroupsClusterRemoveAllGroupsParams : NSObject /** @@ -270,7 +306,7 @@ 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 MTRGroupsClusterAddGroupIfIdentifyingParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSString * _Nonnull groupName API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** @@ -290,6 +326,12 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; @end +@interface MTRGroupsClusterAddGroupIfIdentifyingParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterAddSceneParams : NSObject @@ -842,7 +884,7 @@ 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 MTROnOffClusterOffWithEffectParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull effectId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull effectIdentifier MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull effectVariant API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** @@ -862,6 +904,12 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; @end +@interface MTROnOffClusterOffWithEffectParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull effectId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use effectIdentifier"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTROnOffClusterOnWithRecallGlobalSceneParams : NSObject /** @@ -1448,9 +1496,9 @@ MTR_NEWLY_DEPRECATED("This command has been removed") MTR_NEWLY_AVAILABLE @interface MTROTASoftwareUpdateProviderClusterQueryImageParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull vendorId MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull vendorID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull productId MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull productID MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull softwareVersion MTR_NEWLY_AVAILABLE; @@ -1483,6 +1531,12 @@ MTR_NEWLY_AVAILABLE API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterQueryImageParams") @interface MTROtaSoftwareUpdateProviderClusterQueryImageParams : MTROTASoftwareUpdateProviderClusterQueryImageParams + +@property (nonatomic, copy) NSNumber * _Nonnull vendorId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use vendorID"); + +@property (nonatomic, copy) NSNumber * _Nonnull productId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use productID"); @end MTR_NEWLY_AVAILABLE @@ -1614,11 +1668,11 @@ MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterNotifyUpdate @end MTR_NEWLY_AVAILABLE -@interface MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams : NSObject +@interface MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull providerNodeId MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull providerNodeID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull vendorId MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull vendorID MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull announcementReason MTR_NEWLY_AVAILABLE; @@ -1643,9 +1697,15 @@ MTR_NEWLY_AVAILABLE @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams") +MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams") @interface MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams - : MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams + : MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams + +@property (nonatomic, copy) NSNumber * _Nonnull providerNodeId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use providerNodeID"); + +@property (nonatomic, copy) NSNumber * _Nonnull vendorId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use vendorID"); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 0f925b15110406..66db340cb5044f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -85,7 +85,7 @@ - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); _groupName = @""; _timedInvokeTimeoutMs = nil; @@ -97,7 +97,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterAddGroupParams alloc] init]; - other.groupId = self.groupId; + other.groupID = self.groupID; other.groupName = self.groupName; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -107,10 +107,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: groupId:%@; groupName:%@; >", NSStringFromClass([self class]), _groupId, _groupName]; + [NSString stringWithFormat:@"<%@: groupID:%@; groupName:%@; >", NSStringFromClass([self class]), _groupID, _groupName]; return descriptionString; } +@end + +@implementation MTRGroupsClusterAddGroupParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} @end @implementation MTRGroupsClusterAddGroupResponseParams - (instancetype)init @@ -119,7 +132,7 @@ - (instancetype)init _status = @(0); - _groupId = @(0); + _groupID = @(0); _timedInvokeTimeoutMs = nil; } return self; @@ -130,7 +143,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRGroupsClusterAddGroupResponseParams alloc] init]; other.status = self.status; - other.groupId = self.groupId; + other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -139,17 +152,30 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; >", NSStringFromClass([self class]), _status, _groupId]; + [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; >", NSStringFromClass([self class]), _status, _groupID]; return descriptionString; } +@end + +@implementation MTRGroupsClusterAddGroupResponseParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} @end @implementation MTRGroupsClusterViewGroupParams - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); _timedInvokeTimeoutMs = nil; } return self; @@ -159,7 +185,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterViewGroupParams alloc] init]; - other.groupId = self.groupId; + other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -167,10 +193,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; >", NSStringFromClass([self class]), _groupID]; return descriptionString; } +@end + +@implementation MTRGroupsClusterViewGroupParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} @end @implementation MTRGroupsClusterViewGroupResponseParams - (instancetype)init @@ -179,7 +218,7 @@ - (instancetype)init _status = @(0); - _groupId = @(0); + _groupID = @(0); _groupName = @""; _timedInvokeTimeoutMs = nil; @@ -192,7 +231,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRGroupsClusterViewGroupResponseParams alloc] init]; other.status = self.status; - other.groupId = self.groupId; + other.groupID = self.groupID; other.groupName = self.groupName; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -201,11 +240,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; groupName:%@; >", - NSStringFromClass([self class]), _status, _groupId, _groupName]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; groupName:%@; >", + NSStringFromClass([self class]), _status, _groupID, _groupName]; return descriptionString; } +@end + +@implementation MTRGroupsClusterViewGroupResponseParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} @end @implementation MTRGroupsClusterGetGroupMembershipParams - (instancetype)init @@ -272,7 +324,7 @@ - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); _timedInvokeTimeoutMs = nil; } return self; @@ -282,7 +334,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterRemoveGroupParams alloc] init]; - other.groupId = self.groupId; + other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -290,10 +342,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; >", NSStringFromClass([self class]), _groupID]; return descriptionString; } +@end + +@implementation MTRGroupsClusterRemoveGroupParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} @end @implementation MTRGroupsClusterRemoveGroupResponseParams - (instancetype)init @@ -302,7 +367,7 @@ - (instancetype)init _status = @(0); - _groupId = @(0); + _groupID = @(0); _timedInvokeTimeoutMs = nil; } return self; @@ -313,7 +378,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRGroupsClusterRemoveGroupResponseParams alloc] init]; other.status = self.status; - other.groupId = self.groupId; + other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -322,10 +387,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; >", NSStringFromClass([self class]), _status, _groupId]; + [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; >", NSStringFromClass([self class]), _status, _groupID]; return descriptionString; } +@end + +@implementation MTRGroupsClusterRemoveGroupResponseParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} @end @implementation MTRGroupsClusterRemoveAllGroupsParams - (instancetype)init @@ -357,7 +435,7 @@ - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); _groupName = @""; _timedInvokeTimeoutMs = nil; @@ -369,7 +447,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGroupsClusterAddGroupIfIdentifyingParams alloc] init]; - other.groupId = self.groupId; + other.groupID = self.groupID; other.groupName = self.groupName; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -379,10 +457,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: groupId:%@; groupName:%@; >", NSStringFromClass([self class]), _groupId, _groupName]; + [NSString stringWithFormat:@"<%@: groupID:%@; groupName:%@; >", NSStringFromClass([self class]), _groupID, _groupName]; return descriptionString; } +@end + +@implementation MTRGroupsClusterAddGroupIfIdentifyingParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} @end @implementation MTRScenesClusterAddSceneParams - (instancetype)init @@ -1144,7 +1235,7 @@ - (instancetype)init { if (self = [super init]) { - _effectId = @(0); + _effectIdentifier = @(0); _effectVariant = @(0); _timedInvokeTimeoutMs = nil; @@ -1156,7 +1247,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROnOffClusterOffWithEffectParams alloc] init]; - other.effectId = self.effectId; + other.effectIdentifier = self.effectIdentifier; other.effectVariant = self.effectVariant; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -1165,11 +1256,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString - stringWithFormat:@"<%@: effectId:%@; effectVariant:%@; >", NSStringFromClass([self class]), _effectId, _effectVariant]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: effectIdentifier:%@; effectVariant:%@; >", + NSStringFromClass([self class]), _effectIdentifier, _effectVariant]; return descriptionString; } +@end + +@implementation MTROnOffClusterOffWithEffectParams (Deprecated) + +- (void)setEffectId:(NSNumber * _Nonnull)effectId +{ + self.effectIdentifier = effectId; +} + +- (NSNumber * _Nonnull)effectId +{ + return self.effectIdentifier; +} @end @implementation MTROnOffClusterOnWithRecallGlobalSceneParams - (instancetype)init @@ -1990,9 +2094,9 @@ - (instancetype)init { if (self = [super init]) { - _vendorId = @(0); + _vendorID = @(0); - _productId = @(0); + _productID = @(0); _softwareVersion = @(0); @@ -2014,8 +2118,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init]; - other.vendorId = self.vendorId; - other.productId = self.productId; + other.vendorID = self.vendorID; + other.productID = self.productID; other.softwareVersion = self.softwareVersion; other.protocolsSupported = self.protocolsSupported; other.hardwareVersion = self.hardwareVersion; @@ -2030,9 +2134,9 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: vendorId:%@; productId:%@; softwareVersion:%@; protocolsSupported:%@; " + [NSString stringWithFormat:@"<%@: vendorID:%@; productID:%@; softwareVersion:%@; protocolsSupported:%@; " @"hardwareVersion:%@; location:%@; requestorCanConsent:%@; metadataForProvider:%@; >", - NSStringFromClass([self class]), _vendorId, _productId, _softwareVersion, _protocolsSupported, _hardwareVersion, + NSStringFromClass([self class]), _vendorID, _productID, _softwareVersion, _protocolsSupported, _hardwareVersion, _location, _requestorCanConsent, [_metadataForProvider base64EncodedStringWithOptions:0]]; return descriptionString; } @@ -2040,6 +2144,26 @@ - (NSString *)description @end @implementation MTROtaSoftwareUpdateProviderClusterQueryImageParams + +- (void)setVendorId:(NSNumber * _Nonnull)vendorId +{ + self.vendorID = vendorId; +} + +- (NSNumber * _Nonnull)vendorId +{ + return self.vendorID; +} + +- (void)setProductId:(NSNumber * _Nonnull)productId +{ + self.productID = productId; +} + +- (NSNumber * _Nonnull)productId +{ + return self.productID; +} @end @implementation MTROTASoftwareUpdateProviderClusterQueryImageResponseParams - (instancetype)init @@ -2205,14 +2329,14 @@ - (NSString *)description @implementation MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams @end -@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams +@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams - (instancetype)init { if (self = [super init]) { - _providerNodeId = @(0); + _providerNodeID = @(0); - _vendorId = @(0); + _vendorID = @(0); _announcementReason = @(0); @@ -2226,10 +2350,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; + auto other = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; - other.providerNodeId = self.providerNodeId; - other.vendorId = self.vendorId; + other.providerNodeID = self.providerNodeID; + other.vendorID = self.vendorID; other.announcementReason = self.announcementReason; other.metadataForNode = self.metadataForNode; other.endpoint = self.endpoint; @@ -2241,8 +2365,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: providerNodeId:%@; vendorId:%@; announcementReason:%@; metadataForNode:%@; endpoint:%@; >", - NSStringFromClass([self class]), _providerNodeId, _vendorId, _announcementReason, + stringWithFormat:@"<%@: providerNodeID:%@; vendorID:%@; announcementReason:%@; metadataForNode:%@; endpoint:%@; >", + NSStringFromClass([self class]), _providerNodeID, _vendorID, _announcementReason, [_metadataForNode base64EncodedStringWithOptions:0], _endpoint]; return descriptionString; } @@ -2250,6 +2374,26 @@ - (NSString *)description @end @implementation MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams + +- (void)setProviderNodeId:(NSNumber * _Nonnull)providerNodeId +{ + self.providerNodeID = providerNodeId; +} + +- (NSNumber * _Nonnull)providerNodeId +{ + return self.providerNodeID; +} + +- (void)setVendorId:(NSNumber * _Nonnull)vendorId +{ + self.vendorID = vendorId; +} + +- (NSNumber * _Nonnull)vendorId +{ + return self.vendorID; +} @end @implementation MTRGeneralCommissioningClusterArmFailSafeParams - (instancetype)init diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index f1f15508a0eff6..8e5f792ae28582 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -162,11 +162,11 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead value.changeType = memberValue; } while (0); do { - MTRAccessControlClusterAccessControlEntry * _Nullable memberValue; + MTRAccessControlClusterAccessControlEntryStruct * _Nullable memberValue; if (cppValue.latestValue.IsNull()) { memberValue = nil; } else { - memberValue = [MTRAccessControlClusterAccessControlEntry new]; + memberValue = [MTRAccessControlClusterAccessControlEntryStruct new]; memberValue.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.latestValue.Value().privilege)]; memberValue.authMode = @@ -272,11 +272,11 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead value.changeType = memberValue; } while (0); do { - MTRAccessControlClusterExtensionEntry * _Nullable memberValue; + MTRAccessControlClusterAccessControlExtensionStruct * _Nullable memberValue; if (cppValue.latestValue.IsNull()) { memberValue = nil; } else { - memberValue = [MTRAccessControlClusterExtensionEntry new]; + memberValue = [MTRAccessControlClusterAccessControlExtensionStruct new]; memberValue.data = [NSData dataWithBytes:cppValue.latestValue.Value().data.data() length:cppValue.latestValue.Value().data.size()]; memberValue.fabricIndex = [NSNumber numberWithUnsignedChar:cppValue.latestValue.Value().fabricIndex]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index fdb02bf332a5f7..e67a9749c7bda0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -33,17 +33,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) @interface MTRDescriptorClusterDeviceTypeStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull type API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); +@property (nonatomic, copy) NSNumber * _Nonnull deviceType MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull type API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) + MTR_NEWLY_DEPRECATED("Please use deviceType"); @property (nonatomic, copy) NSNumber * _Nonnull revision API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use MTRDescriptorClusterDeviceTypeStruct") -@interface MTRDescriptorClusterDeviceType : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull type API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRDescriptorClusterDeviceTypeStruct"); -@property (nonatomic, copy) NSNumber * _Nonnull revision API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRDescriptorClusterDeviceTypeStruct"); +@interface MTRDescriptorClusterDeviceType : MTRDescriptorClusterDeviceTypeStruct @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -62,19 +60,28 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nullable deviceType API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end +MTR_NEWLY_AVAILABLE +@interface MTRAccessControlClusterAccessControlEntryStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull privilege MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull authMode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable subjects MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable targets MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_NEWLY_AVAILABLE; +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRAccessControlClusterAccessControlEntry : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull privilege API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull authMode API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSArray * _Nullable subjects API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSArray * _Nullable targets API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_NEWLY_DEPRECATED("Please use MTRAccessControlClusterAccessControlEntryStruct") +@interface MTRAccessControlClusterAccessControlEntry : MTRAccessControlClusterAccessControlEntryStruct +@end +MTR_NEWLY_AVAILABLE +@interface MTRAccessControlClusterAccessControlExtensionStruct : NSObject +@property (nonatomic, copy) NSData * _Nonnull data MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_NEWLY_AVAILABLE; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRAccessControlClusterExtensionEntry : NSObject -@property (nonatomic, copy) NSData * _Nonnull data API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_NEWLY_DEPRECATED("Please use MTRAccessControlClusterAccessControlExtensionStruct") +@interface MTRAccessControlClusterExtensionEntry : MTRAccessControlClusterAccessControlExtensionStruct @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -82,7 +89,7 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nullable adminNodeID API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nullable adminPasscodeID API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nonnull changeType API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) MTRAccessControlClusterAccessControlEntry * _Nullable latestValue API_AVAILABLE( +@property (nonatomic, copy) MTRAccessControlClusterAccessControlEntryStruct * _Nullable latestValue API_AVAILABLE( ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end @@ -92,8 +99,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nullable adminNodeID API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nullable adminPasscodeID API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nonnull changeType API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) - MTRAccessControlClusterExtensionEntry * _Nullable latestValue API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) MTRAccessControlClusterAccessControlExtensionStruct * _Nullable latestValue API_AVAILABLE( + ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end @@ -495,8 +502,8 @@ 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 MTRSwitchClusterMultiPressCompleteEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull previousPosition MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull newPosition API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use previousPosition"); +@property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition API_AVAILABLE( + ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use previousPosition"); @property (nonatomic, copy) NSNumber * _Nonnull totalNumberOfPressesCounted API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 2061188b08017a..178783a5a2d40e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -86,7 +86,7 @@ - (instancetype)init { if (self = [super init]) { - _type = @(0); + _deviceType = @(0); _revision = @(0); } @@ -97,7 +97,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRDescriptorClusterDeviceTypeStruct alloc] init]; - other.type = self.type; + other.deviceType = self.deviceType; other.revision = self.revision; return other; @@ -106,41 +106,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: type:%@; revision:%@; >", NSStringFromClass([self class]), _type, _revision]; + [NSString stringWithFormat:@"<%@: deviceType:%@; revision:%@; >", NSStringFromClass([self class]), _deviceType, _revision]; return descriptionString; } -@end - -@implementation MTRDescriptorClusterDeviceType -- (instancetype)init +- (void)setType:(NSNumber * _Nonnull)type { - if (self = [super init]) { - - _type = @(0); - - _revision = @(0); - } - return self; + self.deviceType = type; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (NSNumber * _Nonnull)type { - auto other = [[MTRDescriptorClusterDeviceType alloc] init]; - - other.type = self.type; - other.revision = self.revision; - - return other; + return self.deviceType; } -- (NSString *)description -{ - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: type:%@; revision:%@; >", NSStringFromClass([self class]), _type, _revision]; - return descriptionString; -} +@end +@implementation MTRDescriptorClusterDeviceType : MTRDescriptorClusterDeviceTypeStruct @end @implementation MTRBindingClusterTargetStruct @@ -217,7 +199,7 @@ - (NSString *)description @end -@implementation MTRAccessControlClusterAccessControlEntry +@implementation MTRAccessControlClusterAccessControlEntryStruct - (instancetype)init { if (self = [super init]) { @@ -237,7 +219,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + auto other = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; other.privilege = self.privilege; other.authMode = self.authMode; @@ -258,7 +240,10 @@ - (NSString *)description @end -@implementation MTRAccessControlClusterExtensionEntry +@implementation MTRAccessControlClusterAccessControlEntry : MTRAccessControlClusterAccessControlEntryStruct +@end + +@implementation MTRAccessControlClusterAccessControlExtensionStruct - (instancetype)init { if (self = [super init]) { @@ -272,7 +257,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRAccessControlClusterExtensionEntry alloc] init]; + auto other = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; other.data = self.data; other.fabricIndex = self.fabricIndex; @@ -289,6 +274,9 @@ - (NSString *)description @end +@implementation MTRAccessControlClusterExtensionEntry : MTRAccessControlClusterAccessControlExtensionStruct +@end + @implementation MTRAccessControlClusterAccessControlEntryChangedEvent - (instancetype)init { @@ -2079,11 +2067,10 @@ - (void)setNewPosition:(NSNumber * _Nonnull)newPosition self.previousPosition = newPosition; } -- (NSNumber * _Nonnull)newPosition +- (NSNumber * _Nonnull)getNewPosition { return self.previousPosition; } - @end @implementation MTROperationalCredentialsClusterFabricDescriptor diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.h b/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.h index 7fd248fdf699d9..acdd2a4d3b762c 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.h +++ b/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.h @@ -55,24 +55,19 @@ class GenericPlatformManagerImpl_POSIX : public GenericPlatformManagerImpl mState{ State::kStopped }; pthread_cond_t mEventQueueStoppedCond; pthread_mutex_t mStateLock; - // - // TODO: This variable is very similar to mMainLoopIsStarted, track the - // cleanup and consolidation in this issue: - // - bool mEventQueueHasStopped = false; - pthread_attr_t mChipTaskAttr; struct sched_param mChipTaskSchedParam; @@ -109,7 +104,7 @@ class GenericPlatformManagerImpl_POSIX : public GenericPlatformManagerImpl mShouldRunEventLoop; + std::atomic mShouldRunEventLoop{ true }; static void * EventLoopTaskMain(void * arg); }; diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp b/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp index 4a52152d91d64f..6050950bf4c261 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp +++ b/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp @@ -59,16 +59,12 @@ CHIP_ERROR GenericPlatformManagerImpl_POSIX::_InitChipStack() // Call up to the base class _InitChipStack() to perform the bulk of the initialization. ReturnErrorOnFailure(GenericPlatformManagerImpl::_InitChipStack()); - mShouldRunEventLoop.store(true, std::memory_order_relaxed); - int ret = pthread_cond_init(&mEventQueueStoppedCond, nullptr); VerifyOrReturnError(ret == 0, CHIP_ERROR_POSIX(ret)); ret = pthread_mutex_init(&mStateLock, nullptr); VerifyOrReturnError(ret == 0, CHIP_ERROR_POSIX(ret)); - mHasValidChipTask = false; - return CHIP_NO_ERROR; } @@ -117,7 +113,11 @@ void GenericPlatformManagerImpl_POSIX::_UnlockChipStack() template bool GenericPlatformManagerImpl_POSIX::_IsChipStackLockedByCurrentThread() const { - return !mHasValidChipTask || (mChipStackIsLocked && (pthread_equal(pthread_self(), mChipStackLockOwnerThread))); + // If no Matter thread is currently running we do not have to worry about + // locking. Hence, this function always returns true in that case. + if (mState.load(std::memory_order_relaxed) == State::kStopped) + return true; + return mChipStackIsLocked && (pthread_equal(pthread_self(), mChipStackLockOwnerThread)); } #endif @@ -153,18 +153,16 @@ void GenericPlatformManagerImpl_POSIX::_RunEventLoop() pthread_mutex_lock(&mStateLock); // - // If we haven't set mHasValidChipTask by now, it means that the application did not call StartEventLoopTask - // and consequently, are running the event loop from their own, externally managed task. - // Let's track his appropriately since we need this info later when stopping the event queues. + // If we haven't set mInternallyManagedChipTask by now, it means that the application did not call + // StartEventLoopTask and consequently, are running the event loop from their own, externally managed + // task. // - if (!mHasValidChipTask) + if (!mInternallyManagedChipTask) { - mHasValidChipTask = true; - mChipTask = pthread_self(); - mTaskType = kExternallyManagedTask; + mChipTask = pthread_self(); + mState.store(State::kRunning, std::memory_order_relaxed); } - mEventQueueHasStopped = false; pthread_mutex_unlock(&mStateLock); Impl()->LockChipStack(); @@ -187,7 +185,7 @@ void GenericPlatformManagerImpl_POSIX::_RunEventLoop() Impl()->UnlockChipStack(); pthread_mutex_lock(&mStateLock); - mEventQueueHasStopped = true; + mState.store(State::kStopping, std::memory_order_relaxed); pthread_mutex_unlock(&mStateLock); // @@ -195,6 +193,13 @@ void GenericPlatformManagerImpl_POSIX::_RunEventLoop() // StopEventLoopTask(). // pthread_cond_signal(&mEventQueueStoppedCond); + + // + // Mark event loop as truly stopped. After that line, we can not use any + // non-simple type member variables, because they can be destroyed by the + // Shutdown() method. + // + mState.store(State::kStopped, std::memory_order_relaxed); } template @@ -230,8 +235,8 @@ CHIP_ERROR GenericPlatformManagerImpl_POSIX::_StartEventLoopTask() err = pthread_create(&mChipTask, &mChipTaskAttr, EventLoopTaskMain, this); if (err == 0) { - mHasValidChipTask = true; - mTaskType = kInternallyManagedTask; + mInternallyManagedChipTask = true; + mState.store(State::kRunning, std::memory_order_relaxed); } pthread_mutex_unlock(&mStateLock); @@ -255,7 +260,8 @@ CHIP_ERROR GenericPlatformManagerImpl_POSIX::_StopEventLoopTask() // If we're calling this from a different thread than the one running chip, then // we need to wait till the event queue has completely stopped before proceeding. // - if (mHasValidChipTask && (pthread_equal(pthread_self(), mChipTask) == 0)) + auto isRunning = mState.load(std::memory_order_relaxed) == State::kRunning; + if (isRunning && (pthread_equal(pthread_self(), mChipTask) == 0)) { pthread_mutex_unlock(&mStateLock); @@ -269,7 +275,7 @@ CHIP_ERROR GenericPlatformManagerImpl_POSIX::_StopEventLoopTask() pthread_mutex_lock(&mStateLock); - while (!mEventQueueHasStopped) + while (mState.load(std::memory_order_relaxed) == State::kRunning) { err = pthread_cond_wait(&mEventQueueStoppedCond, &mStateLock); VerifyOrExit(err == 0, ); @@ -280,7 +286,7 @@ CHIP_ERROR GenericPlatformManagerImpl_POSIX::_StopEventLoopTask() // // Wait further for the thread to terminate if we had previously created it. // - if (mTaskType == kInternallyManagedTask) + if (mInternallyManagedChipTask) { err = pthread_join(mChipTask, nullptr); VerifyOrExit(err == 0, ); @@ -292,13 +298,19 @@ CHIP_ERROR GenericPlatformManagerImpl_POSIX::_StopEventLoopTask() } exit: - mHasValidChipTask = false; return CHIP_ERROR_POSIX(err); } template void GenericPlatformManagerImpl_POSIX::_Shutdown() { + // + // We cannot shutdown the stack while the event loop is still running. This can lead + // to use after free errors - here we are destroying mutex and condition variable that + // are still in use by the event loop! + // + VerifyOrDie(mState.load(std::memory_order_relaxed) == State::kStopped); + pthread_mutex_destroy(&mStateLock); pthread_cond_destroy(&mEventQueueStoppedCond); diff --git a/src/lib/core/DataModelTypes.h b/src/lib/core/DataModelTypes.h index 4c955f3948a7d2..a25eb3e53ebd3b 100644 --- a/src/lib/core/DataModelTypes.h +++ b/src/lib/core/DataModelTypes.h @@ -58,6 +58,10 @@ constexpr EndpointId kRootEndpointId = 0; constexpr ListIndex kInvalidListIndex = 0xFFFF; // List index is a uint16 thus 0xFFFF is a invalid list index. constexpr KeysetId kInvalidKeysetId = 0xFFFF; +// Invalid IC identifier is provisional. Value will most likely change when identifying token is defined +// https://github.com/project-chip/connectedhomeip/issues/24251 +constexpr uint64_t kInvalidIcId = 0; + // These are MEIs, 0xFFFF is not a valid manufacturer code, // thus 0xFFFF'FFFF is not a valid MEI. static constexpr ClusterId kInvalidClusterId = 0xFFFF'FFFF; diff --git a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp index 6153ee8245f37a..d38b8f5ff1e37d 100644 --- a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp +++ b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp @@ -878,6 +878,7 @@ void AdvertiserMinMdns::AdvertiseRecords(BroadcastAdvertiseType type) } UniquePtr allInterfaces = GetAddressPolicy()->GetListenEndpoints(); + VerifyOrDieWithMsg(allInterfaces != nullptr, Discovery, "Failed to allocate memory for endpoints."); chip::Inet::InterfaceId interfaceId; chip::Inet::IPAddressType addressType; @@ -885,6 +886,7 @@ void AdvertiserMinMdns::AdvertiseRecords(BroadcastAdvertiseType type) while (allInterfaces->Next(&interfaceId, &addressType)) { UniquePtr allIps = GetAddressPolicy()->GetIpAddressesForEndpoint(interfaceId, addressType); + VerifyOrDieWithMsg(allIps != nullptr, Discovery, "Failed to allocate memory for ip addresses."); Inet::IPAddress ipAddress; while (allIps->Next(ipAddress)) diff --git a/src/lib/support/DefaultStorageKeyAllocator.h b/src/lib/support/DefaultStorageKeyAllocator.h index 6a4b906c2426b8..d74a0e75bcbba5 100644 --- a/src/lib/support/DefaultStorageKeyAllocator.h +++ b/src/lib/support/DefaultStorageKeyAllocator.h @@ -175,6 +175,13 @@ 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 + + static StorageKeyName ClientMonitoringTableEntry(chip::FabricIndex fabric) + { + return StorageKeyName::Formatted("f/%x/cm", fabric); + } + static StorageKeyName OTADefaultProviders() { return StorageKeyName::FromConst("g/o/dp"); } static StorageKeyName OTACurrentProvider() { return StorageKeyName::FromConst("g/o/cp"); } static StorageKeyName OTAUpdateToken() { return StorageKeyName::FromConst("g/o/ut"); } diff --git a/src/lib/support/UnitTestRegistration.cpp b/src/lib/support/UnitTestRegistration.cpp index a94fcb6f392e50..e706bbc891d6a5 100644 --- a/src/lib/support/UnitTestRegistration.cpp +++ b/src/lib/support/UnitTestRegistration.cpp @@ -22,7 +22,7 @@ namespace chip { -const size_t kTestSuitesMax = 128; +const size_t kTestSuitesMax = 256; typedef struct { diff --git a/src/lib/support/logging/CHIPLogging.h b/src/lib/support/logging/CHIPLogging.h index 28bdeb59c34a9b..1591e6824c3e7d 100644 --- a/src/lib/support/logging/CHIPLogging.h +++ b/src/lib/support/logging/CHIPLogging.h @@ -100,7 +100,7 @@ DLL_EXPORT void SetLogFilter(uint8_t category); * category. * */ -#define ChipLogError(MOD, MSG, ...) ChipInternalLog(MOD, Error, MSG, ##__VA_ARGS__) +#define ChipLogError(MOD, MSG, ...) ChipInternalLog(MOD, ERROR, MSG, ##__VA_ARGS__) #else // CHIP_ERROR_LOGGING #define ChipLogError(MOD, MSG, ...) ((void) 0) #endif // CHIP_ERROR_LOGGING @@ -114,7 +114,7 @@ DLL_EXPORT void SetLogFilter(uint8_t category); * category. * */ -#define ChipLogProgress(MOD, MSG, ...) ChipInternalLog(MOD, Progress, MSG, ##__VA_ARGS__) +#define ChipLogProgress(MOD, MSG, ...) ChipInternalLog(MOD, PROGRESS, MSG, ##__VA_ARGS__) #else // CHIP_PROGRESS_LOGGING #define ChipLogProgress(MOD, MSG, ...) ((void) 0) #endif // CHIP_PROGRESS_LOGGING @@ -128,7 +128,7 @@ DLL_EXPORT void SetLogFilter(uint8_t category); * category. * */ -#define ChipLogDetail(MOD, MSG, ...) ChipInternalLog(MOD, Detail, MSG, ##__VA_ARGS__) +#define ChipLogDetail(MOD, MSG, ...) ChipInternalLog(MOD, DETAIL, MSG, ##__VA_ARGS__) /** * @def ChipLogByteSpan(MOD, DATA) @@ -137,7 +137,7 @@ DLL_EXPORT void SetLogFilter(uint8_t category); * Log a byte span for the specified module in the 'Detail' category. * */ -#define ChipLogByteSpan(MOD, DATA) ChipInternalLogByteSpan(MOD, Detail, DATA) +#define ChipLogByteSpan(MOD, DATA) ChipInternalLogByteSpan(MOD, DETAIL, DATA) #else // CHP_DETAIL_LOGGING #define ChipLogDetail(MOD, MSG, ...) ((void) 0) #define ChipLogByteSpan(MOD, DATA) ((void) 0) @@ -152,7 +152,7 @@ DLL_EXPORT void SetLogFilter(uint8_t category); * category. * */ -#define ChipLogAutomation(MSG, ...) ChipInternalLog(Automation, Automation, MSG, ##__VA_ARGS__) +#define ChipLogAutomation(MSG, ...) ChipInternalLog(Automation, AUTOMATION, MSG, ##__VA_ARGS__) #else // CHIP_AUTOMATION_LOGGING #define ChipLogAutomation(MOD, MSG, ...) ((void) 0) #endif // CHIP_AUTOMATION_LOGGING @@ -346,6 +346,55 @@ DLL_LOCAL inline bool IsCategoryEnabled(uint8_t category) } #endif // CHIP_LOG_FILTERING +/* Internal macros mapping upper case definitions to camel case category constants*/ +#define CHIP_LOG_CATEGORY_DETAIL chip::Logging::kLogCategory_Detail +#define CHIP_LOG_CATEGORY_PROGRESS chip::Logging::kLogCategory_Progress +#define CHIP_LOG_CATEGORY_ERROR chip::Logging::kLogCategory_Error +#define CHIP_LOG_CATEGORY_AUTOMATION chip::Logging::kLogCategory_Automation + +/* + * CHIP Logging Modules Categories filtering implementation. + * + * @brief + * Macro for use to check if given category is enabled for given log module. + * + * Example Usage: + * Let's assume PROGRESS category control for DeviceLayer log module. + * + * Default behavior - category is not modified, so macro returns global category value: + * IsModuleCategoryEnabled(DeviceLayer, PROGRESS) returns CHIP_PROGRESS_LOGGING + * + * Enabling category - category is enabled for module, the category value is ignored and the global value is used: + * #define CHIP_CONFIG_LOG_MODULE_DeviceLayer_PROGRESS 1 + * IsModuleCategoryEnabled(DeviceLayer, PROGRESS) returns CHIP_PROGRESS_LOGGING + * + * Disabling category - category is disabled for module, ignoring global category value: + * #define CHIP_CONFIG_LOG_MODULE_DeviceLayer_PROGRESS 0 + * IsModuleCategoryEnabled(DeviceLayer, PROGRESS) returns 0 + * + * Algorithm flow: + * 1. IsModuleCategoryEnabled(MOD, CAT) uses MOD and CAT to create strings for category module macro and global category macro, + * and invokes _IsModuleCategoryEnabled1(). + * 2. _IsModuleCategoryEnabled1(MOD_CAT, GLOB_CAT) invokes _IsModuleCategoryEnabled2(MOD_CAT, GLOB_CAT) to extract macros + * values. + * 3. _IsModuleCategoryEnabled2(MOD_CAT, GLOB_CAT) uses MOD_CAT to create string for helper macro. + * - If MOD_CAT is 0 the helper macro containing dummy arg is used. + * - If MOD_CAT doesn't exist, empty is used. + * 4. _IsModuleCategoryEnabled3(DUMMY_ARG, GLOB_CAT) invokes _IsModuleCategoryEnabled4() using different number of arguments + * depending on DUMMY_ARG. + * 5. _IsModuleCategoryEnabled4 output: + * - If category for module was not defined or define 1, the DUMMY_ARG was empty, so returning ARG2 is GLOB_CAT. + * - If category for module was defined 0, the DUMMY_ARG had one argument, so returning ARG2 is 0. + * + */ +#define IsModuleCategoryEnabled(MOD, CAT) _IsModuleCategoryEnabled1(CHIP_CONFIG_LOG_MODULE_##MOD##_##CAT, CHIP_##CAT##_LOGGING) +#define _IsModuleCategoryEnabled1(MOD_CAT, GLOB_CAT) _IsModuleCategoryEnabled2(MOD_CAT, GLOB_CAT) +#define _IsModuleCategoryEnabled2(MOD_CAT, GLOB_CAT) \ + _IsModuleCategoryEnabled3(_IsModuleCategoryEnabled3_DummyArg##MOD_CAT, GLOB_CAT) +#define _IsModuleCategoryEnabled3_DummyArg0 dummyArg, +#define _IsModuleCategoryEnabled3(DUMMY_ARG, GLOB_CAT) _IsModuleCategoryEnabled4(DUMMY_ARG 0, GLOB_CAT) +#define _IsModuleCategoryEnabled4(ARG1, ARG2, ...) (ARG2) + DLL_LOCAL void Log(uint8_t module, uint8_t category, const char * msg, ...) ENFORCE_FORMAT(3, 4); DLL_LOCAL void LogByteSpan(uint8_t module, uint8_t category, const ByteSpan & span); DLL_LOCAL void LogV(uint8_t module, uint8_t category, const char * msg, va_list args) ENFORCE_FORMAT(3, 0); @@ -360,28 +409,36 @@ DLL_LOCAL void LogV(uint8_t module, uint8_t category, const char * msg, va_list #define ChipInternalLog(...) ChipPlatformLog(__VA_ARGS__) #define ChipInternalLogByteSpan(...) ChipPlatformLogByteSpan(__VA_ARGS__) #else // CHIP_SYSTEM_CONFIG_PLATFORM_LOG -#define ChipInternalLog(MOD, CAT, MSG, ...) ChipInternalLogImpl(MOD, CAT, MSG, ##__VA_ARGS__) -#define ChipInternalLogByteSpan(MOD, CAT, DATA) ChipInternalLogByteSpanImpl(MOD, CAT, DATA) +#define ChipInternalLog(MOD, CAT, MSG, ...) \ + if (CHIP_CONFIG_LOG_MODULE_##MOD && IsModuleCategoryEnabled(MOD, CAT)) \ + { \ + ChipInternalLogImpl(MOD, CHIP_LOG_CATEGORY_##CAT, MSG, ##__VA_ARGS__); \ + } + +#define ChipInternalLogByteSpan(MOD, CAT, DATA) \ + if (CHIP_CONFIG_LOG_MODULE_##MOD && IsModuleCategoryEnabled(MOD, CAT)) \ + { \ + ChipInternalLogByteSpanImpl(MOD, CHIP_LOG_CATEGORY_##CAT, DATA); \ + } #endif // CHIP_SYSTEM_CONFIG_PLATFORM_LOG #if CHIP_PW_TOKENIZER_LOGGING #define ChipInternalLogImpl(MOD, CAT, MSG, ...) \ do \ { \ - if (chip::Logging::IsCategoryEnabled(chip::Logging::kLogCategory_##CAT)) \ + if (chip::Logging::IsCategoryEnabled(CAT)) \ { \ - PW_TOKENIZE_TO_GLOBAL_HANDLER_WITH_PAYLOAD( \ - (pw_tokenizer_Payload)((chip::Logging::kLogCategory_##CAT << 8) | chip::Logging::kLogModule_##MOD), MSG, \ - __VA_ARGS__); \ + PW_TOKENIZE_TO_GLOBAL_HANDLER_WITH_PAYLOAD((pw_tokenizer_Payload)((CAT << 8) | chip::Logging::kLogModule_##MOD), MSG, \ + __VA_ARGS__); \ } \ } while (0) #else // CHIP_PW_TOKENIZER_LOGGING #define ChipInternalLogImpl(MOD, CAT, MSG, ...) \ do \ { \ - if (chip::Logging::IsCategoryEnabled(chip::Logging::kLogCategory_##CAT)) \ + if (chip::Logging::IsCategoryEnabled(CAT)) \ { \ - chip::Logging::Log(chip::Logging::kLogModule_##MOD, chip::Logging::kLogCategory_##CAT, MSG, ##__VA_ARGS__); \ + chip::Logging::Log(chip::Logging::kLogModule_##MOD, CAT, MSG, ##__VA_ARGS__); \ } \ } while (0) #endif // CHIP_PW_TOKENIZER_LOGGING @@ -389,9 +446,9 @@ DLL_LOCAL void LogV(uint8_t module, uint8_t category, const char * msg, va_list #define ChipInternalLogByteSpanImpl(MOD, CAT, DATA) \ do \ { \ - if (chip::Logging::IsCategoryEnabled(chip::Logging::kLogCategory_##CAT)) \ + if (chip::Logging::IsCategoryEnabled(CAT)) \ { \ - chip::Logging::LogByteSpan(chip::Logging::kLogModule_##MOD, chip::Logging::kLogCategory_##CAT, DATA); \ + chip::Logging::LogByteSpan(chip::Logging::kLogModule_##MOD, CAT, DATA); \ } \ } while (0) diff --git a/src/lib/support/logging/Constants.h b/src/lib/support/logging/Constants.h index c91cf1af5da34a..5abf073bf48a68 100644 --- a/src/lib/support/logging/Constants.h +++ b/src/lib/support/logging/Constants.h @@ -63,6 +63,169 @@ enum LogModule kLogModule_Max }; +/* Log modules enablers. Those definitions can be overwritten with 0 to disable + some log regions. */ + +#ifndef CHIP_CONFIG_LOG_MODULE_NotSpecified +#define CHIP_CONFIG_LOG_MODULE_NotSpecified 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Inet +#define CHIP_CONFIG_LOG_MODULE_Inet 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Ble +#define CHIP_CONFIG_LOG_MODULE_Ble 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_MessageLayer +#define CHIP_CONFIG_LOG_MODULE_MessageLayer 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_SecurityManager +#define CHIP_CONFIG_LOG_MODULE_SecurityManager 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_ExchangeManager +#define CHIP_CONFIG_LOG_MODULE_ExchangeManager 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_TLV +#define CHIP_CONFIG_LOG_MODULE_TLV 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_ASN1 +#define CHIP_CONFIG_LOG_MODULE_ASN1 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Crypto +#define CHIP_CONFIG_LOG_MODULE_Crypto 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Controller +#define CHIP_CONFIG_LOG_MODULE_Controller 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Alarm +#define CHIP_CONFIG_LOG_MODULE_Alarm 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_SecureChannel +#define CHIP_CONFIG_LOG_MODULE_SecureChannel 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_BDX +#define CHIP_CONFIG_LOG_MODULE_BDX 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_DataManagement +#define CHIP_CONFIG_LOG_MODULE_DataManagement 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_DeviceControl +#define CHIP_CONFIG_LOG_MODULE_DeviceControl 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_DeviceDescription +#define CHIP_CONFIG_LOG_MODULE_DeviceDescription 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Echo +#define CHIP_CONFIG_LOG_MODULE_Echo 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_FabricProvisioning +#define CHIP_CONFIG_LOG_MODULE_FabricProvisioning 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_NetworkProvisioning +#define CHIP_CONFIG_LOG_MODULE_NetworkProvisioning 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_ServiceDiscovery +#define CHIP_CONFIG_LOG_MODULE_ServiceDiscovery 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_ServiceProvisioning +#define CHIP_CONFIG_LOG_MODULE_ServiceProvisioning 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_SoftwareUpdate +#define CHIP_CONFIG_LOG_MODULE_SoftwareUpdate 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_FailSafe +#define CHIP_CONFIG_LOG_MODULE_FailSafe 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_TimeService +#define CHIP_CONFIG_LOG_MODULE_TimeService 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Heartbeat +#define CHIP_CONFIG_LOG_MODULE_Heartbeat 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_chipSystemLayer +#define CHIP_CONFIG_LOG_MODULE_chipSystemLayer 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_EventLogging +#define CHIP_CONFIG_LOG_MODULE_EventLogging 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Support +#define CHIP_CONFIG_LOG_MODULE_Support 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_chipTool +#define CHIP_CONFIG_LOG_MODULE_chipTool 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Zcl +#define CHIP_CONFIG_LOG_MODULE_Zcl 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Shell +#define CHIP_CONFIG_LOG_MODULE_Shell 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_DeviceLayer +#define CHIP_CONFIG_LOG_MODULE_DeviceLayer 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_SetupPayload +#define CHIP_CONFIG_LOG_MODULE_SetupPayload 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_AppServer +#define CHIP_CONFIG_LOG_MODULE_AppServer 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Discovery +#define CHIP_CONFIG_LOG_MODULE_Discovery 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_InteractionModel +#define CHIP_CONFIG_LOG_MODULE_InteractionModel 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Test +#define CHIP_CONFIG_LOG_MODULE_Test 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_OperationalSessionSetup +#define CHIP_CONFIG_LOG_MODULE_OperationalSessionSetup 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_Automation +#define CHIP_CONFIG_LOG_MODULE_Automation 1 +#endif + +#ifndef CHIP_CONFIG_LOG_MODULE_CASESessionManager +#define CHIP_CONFIG_LOG_MODULE_CASESessionManager 1 +#endif + /** * @enum LogCategory * diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index f5b1ae97faa387..398de03d637084 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -104,8 +104,10 @@ CHIP_ERROR AmebaConfig::ReadConfigValue(Key key, bool & val) success = getPref_bool_new(key.Namespace, key.Name, &intVal); if (success != 0) + { ChipLogProgress(DeviceLayer, "getPref_bool_new: %s/%s failed\n", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name)); + } val = (intVal != 0); @@ -121,8 +123,10 @@ CHIP_ERROR AmebaConfig::ReadConfigValue(Key key, uint32_t & val) success = getPref_u32_new(key.Namespace, key.Name, &val); if (success != 0) + { ChipLogProgress(DeviceLayer, "getPref_u32_new: %s/%s failed\n", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name)); + } if (success == 0) return CHIP_NO_ERROR; @@ -136,8 +140,10 @@ CHIP_ERROR AmebaConfig::ReadConfigValue(Key key, uint64_t & val) success = getPref_u64_new(key.Namespace, key.Name, &val); if (success != 0) + { ChipLogProgress(DeviceLayer, "getPref_u32_new: %s/%s failed\n", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name)); + } if (success == 0) return CHIP_NO_ERROR; @@ -151,8 +157,10 @@ CHIP_ERROR AmebaConfig::ReadConfigValueStr(Key key, char * buf, size_t bufSize, success = getPref_str_new(key.Namespace, key.Name, buf, bufSize, &outLen); if (success != 0) + { ChipLogProgress(DeviceLayer, "getPref_str_new: %s/%s failed\n", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name)); + } if (success == 0) { @@ -172,8 +180,10 @@ CHIP_ERROR AmebaConfig::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSiz success = getPref_bin_new(key.Namespace, key.Name, buf, bufSize, &outLen); if (success != 0) + { ChipLogProgress(DeviceLayer, "getPref_bin_new: %s/%s failed\n", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name)); + } if (success == 0) { @@ -197,11 +207,15 @@ CHIP_ERROR AmebaConfig::WriteConfigValue(Key key, bool val) value = 0; success = setPref_new(key.Namespace, key.Name, &value, 1); if (!success) + { ChipLogError(DeviceLayer, "setPref: %s/%s = %s failed\n", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name), value ? "true" : "false"); + } else + { ChipLogProgress(DeviceLayer, "NVS set: %s/%s = %s", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name), val ? "true" : "false"); + } return CHIP_NO_ERROR; } @@ -212,11 +226,15 @@ CHIP_ERROR AmebaConfig::WriteConfigValue(Key key, uint32_t val) success = setPref_new(key.Namespace, key.Name, (uint8_t *) &val, sizeof(uint32_t)); if (!success) + { ChipLogError(DeviceLayer, "setPref: %s/%s = %d(0x%x) failed\n", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name), val, val); + } else + { ChipLogProgress(DeviceLayer, "NVS set: %s/%s = %" PRIu32 " (0x%" PRIX32 ")", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name), val, val); + } return CHIP_NO_ERROR; } @@ -227,11 +245,15 @@ CHIP_ERROR AmebaConfig::WriteConfigValue(Key key, uint64_t val) success = setPref_new(key.Namespace, key.Name, (uint8_t *) &val, sizeof(uint64_t)); if (!success) + { ChipLogError(DeviceLayer, "setPref: %s/%s = %d(0x%x) failed\n", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name), val, val); + } else + { ChipLogProgress(DeviceLayer, "NVS set: %s/%s = %" PRIu64 " (0x%" PRIX64 ")", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name), val, val); + } return CHIP_NO_ERROR; } @@ -242,11 +264,15 @@ CHIP_ERROR AmebaConfig::WriteConfigValueStr(Key key, const char * str) success = setPref_new(key.Namespace, key.Name, (uint8_t *) str, strlen(str) + 1); if (!success) + { ChipLogError(DeviceLayer, "setPref: %s/%s = %s failed\n", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name), StringOrNullMarker(str)); + } else + { ChipLogProgress(DeviceLayer, "NVS set: %s/%s = \"%s\"", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name), StringOrNullMarker(str)); + } return CHIP_NO_ERROR; } @@ -272,10 +298,14 @@ CHIP_ERROR AmebaConfig::WriteConfigValueBin(Key key, const uint8_t * data, size_ success = setPref_new(key.Namespace, key.Name, (uint8_t *) data, dataLen); if (!success) + { ChipLogError(DeviceLayer, "setPref: %s/%s failed\n", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name)); + } else + { ChipLogProgress(DeviceLayer, "NVS set: %s/%s = (blob length %" PRId32 ")", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name), dataLen); + } return CHIP_NO_ERROR; } @@ -286,10 +316,14 @@ CHIP_ERROR AmebaConfig::ClearConfigValue(Key key) success = deleteKey(key.Namespace, key.Name); if (!success) + { ChipLogProgress(DeviceLayer, "%s : %s/%s failed\n", __FUNCTION__, StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name)); + } else + { ChipLogProgress(DeviceLayer, "NVS erase: %s/%s", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name)); + } return CHIP_NO_ERROR; } diff --git a/src/platform/Darwin/Logging.h b/src/platform/Darwin/Logging.h index 7fcb82a99f663a..30f6c966af8a53 100644 --- a/src/platform/Darwin/Logging.h +++ b/src/platform/Darwin/Logging.h @@ -34,7 +34,7 @@ _Pragma("clang diagnostic ignored \"-Wformat\""); \ os_log_with_type(chip::Logging::Platform::LoggerForModule(chip::Logging::kLogModule_##MOD, #MOD), \ static_cast(chip::Logging::Platform::kOSLogCategory_##CAT), MSG, ##__VA_ARGS__); \ - ChipInternalLogImpl(MOD, CAT, MSG, ##__VA_ARGS__); \ + ChipInternalLogImpl(MOD, CHIP_LOG_CATEGORY_##CAT, MSG, ##__VA_ARGS__); \ _Pragma("clang diagnostic pop"); \ } while (0) @@ -43,7 +43,7 @@ { \ chip::Logging::Platform::LogByteSpan(chip::Logging::kLogModule_##MOD, #MOD, \ static_cast(chip::Logging::Platform::kOSLogCategory_##CAT), DATA); \ - ChipInternalLogByteSpanImpl(MOD, CAT, DATA); \ + ChipInternalLogByteSpanImpl(MOD, CHIP_LOG_CATEGORY_##CAT, DATA); \ } while (0) namespace chip { @@ -59,10 +59,10 @@ namespace Platform { // Names align with chip::Logging::LogCategory enum OSLogCategory { - kOSLogCategory_Error = OS_LOG_TYPE_ERROR, - kOSLogCategory_Progress = OS_LOG_TYPE_DEFAULT, - kOSLogCategory_Detail = OS_LOG_TYPE_INFO, - kOSLogCategory_Automation = OS_LOG_TYPE_DEFAULT, + kOSLogCategory_ERROR = OS_LOG_TYPE_ERROR, + kOSLogCategory_PROGRESS = OS_LOG_TYPE_DEFAULT, + kOSLogCategory_DETAIL = OS_LOG_TYPE_INFO, + kOSLogCategory_AUTOMATION = OS_LOG_TYPE_DEFAULT, }; DLL_LOCAL os_log_t LoggerForModule(chip::Logging::LogModule moduleId, char const * moduleName); diff --git a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp index 2eb2e1b3ad11e0..c068bba75cb492 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp @@ -104,11 +104,6 @@ void ConnectivityManagerImpl::_ClearWiFiStationProvision(void) { if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled) { - wifi_config_t stationConfig; - - memset(&stationConfig, 0, sizeof(stationConfig)); - esp_wifi_set_config(WIFI_IF_STA, &stationConfig); - DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL); #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP DeviceLayer::SystemLayer().ScheduleWork(DriveAPState, NULL); diff --git a/src/platform/Zephyr/Logging.cpp b/src/platform/Zephyr/Logging.cpp index f8e2015d415367..4f7322534e331e 100644 --- a/src/platform/Zephyr/Logging.cpp +++ b/src/platform/Zephyr/Logging.cpp @@ -19,7 +19,8 @@ #define LOG_MESSAGE(msg) (msg) #endif -LOG_MODULE_REGISTER(chip, CONFIG_MATTER_LOG_LEVEL); +/* Assume using always debug level and rely on Matter logger layer filtering */ +LOG_MODULE_REGISTER(chip, LOG_LEVEL_DBG); namespace chip { namespace DeviceLayer { diff --git a/src/platform/Zephyr/SystemPlatformConfig.h b/src/platform/Zephyr/SystemPlatformConfig.h index b8e8872a617d93..0ea9af8c3b05af 100644 --- a/src/platform/Zephyr/SystemPlatformConfig.h +++ b/src/platform/Zephyr/SystemPlatformConfig.h @@ -34,10 +34,6 @@ struct ChipDeviceEvent; // ==================== Platform Adaptations ==================== -#define CHIP_SYSTEM_CONFIG_POSIX_LOCKING 1 -#define CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING 0 -#define CHIP_SYSTEM_CONFIG_NO_LOCKING 0 - #ifndef CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 0 #endif // CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS diff --git a/src/platform/nrfconnect/CHIPPlatformConfig.h b/src/platform/nrfconnect/CHIPPlatformConfig.h index 32ae780eb672f2..c4b975baf24b4a 100644 --- a/src/platform/nrfconnect/CHIPPlatformConfig.h +++ b/src/platform/nrfconnect/CHIPPlatformConfig.h @@ -69,3 +69,29 @@ #ifndef CHIP_CONFIG_MAX_FABRICS #define CHIP_CONFIG_MAX_FABRICS 5 #endif + +#if CONFIG_CHIP_LOG_SIZE_OPTIMIZATION +// Disable some of the too detailed log modules to save flash +#define CHIP_CONFIG_LOG_MODULE_ExchangeManager_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_Crypto_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_Crypto_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_BDX_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_BDX_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_EventLogging_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_EventLogging_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_SetupPayload_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_SetupPayload_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_CASESessionManager_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_CASESessionManager_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_DataManagement_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_FabricProvisioning_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_chipSystemLayer_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_chipSystemLayer_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_Zcl_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_SecureChannel_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_Ble_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_AppServer_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_Support_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_Support_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_DeviceLayer_DETAIL 0 +#endif diff --git a/src/platform/nrfconnect/SystemPlatformConfig.h b/src/platform/nrfconnect/SystemPlatformConfig.h index 803005c4df4531..cd863d5c67dcd4 100644 --- a/src/platform/nrfconnect/SystemPlatformConfig.h +++ b/src/platform/nrfconnect/SystemPlatformConfig.h @@ -34,10 +34,6 @@ struct ChipDeviceEvent; // ==================== Platform Adaptations ==================== -#define CHIP_SYSTEM_CONFIG_POSIX_LOCKING 1 -#define CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING 0 -#define CHIP_SYSTEM_CONFIG_NO_LOCKING 0 - #ifndef CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 0 #endif // CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS diff --git a/src/platform/telink/SystemPlatformConfig.h b/src/platform/telink/SystemPlatformConfig.h index 5e3fce6a5b0023..4e80b6e51ca413 100644 --- a/src/platform/telink/SystemPlatformConfig.h +++ b/src/platform/telink/SystemPlatformConfig.h @@ -34,10 +34,6 @@ struct ChipDeviceEvent; // ==================== Platform Adaptations ==================== -#define CHIP_SYSTEM_CONFIG_POSIX_LOCKING 1 -#define CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING 0 -#define CHIP_SYSTEM_CONFIG_NO_LOCKING 0 - #ifndef CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 0 #endif // CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS diff --git a/src/python_testing/TC_RR_1_1.py b/src/python_testing/TC_RR_1_1.py index e6b5c738b4d679..85ffaba8d221ad 100644 --- a/src/python_testing/TC_RR_1_1.py +++ b/src/python_testing/TC_RR_1_1.py @@ -116,7 +116,7 @@ async def test_TC_RR_1_1(self): client_list.append(dev_ctrl) if num_controllers_per_fabric > 1: - new_controllers = await CommissioningBuildingBlocks.CreateControllersOnFabric(fabricAdmin=dev_ctrl.fabricAdmin, adminDevCtrl=dev_ctrl, controllerNodeIds=node_ids, privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, targetNodeId=self.dut_node_id, catTags=[0x0001_0001]) + new_controllers = await CommissioningBuildingBlocks.CreateControllersOnFabric(fabricAdmin=dev_ctrl.fabricAdmin, adminDevCtrl=dev_ctrl, controllerNodeIds=node_ids, privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, targetNodeId=self.dut_node_id, catTags=[0x0001_0001]) for controller in new_controllers: controller.name = all_names.pop(0) client_list.extend(new_controllers) @@ -135,7 +135,7 @@ async def test_TC_RR_1_1(self): if num_controllers_per_fabric > 1: new_controllers = await CommissioningBuildingBlocks.CreateControllersOnFabric(fabricAdmin=new_fabric_admin, adminDevCtrl=new_admin_ctrl, - controllerNodeIds=node_ids, privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, targetNodeId=self.dut_node_id, catTags=[0x0001_0001]) + controllerNodeIds=node_ids, privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, targetNodeId=self.dut_node_id, catTags=[0x0001_0001]) for controller in new_controllers: controller.name = all_names.pop(0) @@ -407,10 +407,10 @@ def build_acl(self, fabric_number, client_by_name, num_controllers_per_fabric): Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC00, deviceType=0xFFF1_BC30), Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC01, deviceType=0xFFF1_BC31) ] - admin_acl_entry = Clusters.AccessControl.Structs.AccessControlEntry(privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, - authMode=Clusters.AccessControl.Enums.AuthMode.kCase, - subjects=admin_subjects, - targets=admin_targets) + admin_acl_entry = Clusters.AccessControl.Structs.AccessControlEntryStruct(privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, + authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, + subjects=admin_subjects, + targets=admin_targets) acl.append(admin_acl_entry) # Manage ACL entry @@ -421,10 +421,10 @@ def build_acl(self, fabric_number, client_by_name, num_controllers_per_fabric): Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC02, deviceType=0xFFF1_BC22) ] - manage_acl_entry = Clusters.AccessControl.Structs.AccessControlEntry(privilege=Clusters.AccessControl.Enums.Privilege.kManage, - authMode=Clusters.AccessControl.Enums.AuthMode.kCase, - subjects=manage_subjects, - targets=manage_targets) + manage_acl_entry = Clusters.AccessControl.Structs.AccessControlEntryStruct(privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kManage, + authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, + subjects=manage_subjects, + targets=manage_targets) acl.append(manage_acl_entry) # Operate ACL entry @@ -435,10 +435,10 @@ def build_acl(self, fabric_number, client_by_name, num_controllers_per_fabric): Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC42, deviceType=0xFFF1_BC42) ] - operate_acl_entry = Clusters.AccessControl.Structs.AccessControlEntry(privilege=Clusters.AccessControl.Enums.Privilege.kOperate, - authMode=Clusters.AccessControl.Enums.AuthMode.kCase, - subjects=operate_subjects, - targets=operate_targets) + operate_acl_entry = Clusters.AccessControl.Structs.AccessControlEntryStruct(privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kOperate, + authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, + subjects=operate_subjects, + targets=operate_targets) acl.append(operate_acl_entry) return acl diff --git a/src/python_testing/TC_SC_3_6.py b/src/python_testing/TC_SC_3_6.py index fbfca810adcc3c..363db9118e1cb3 100644 --- a/src/python_testing/TC_SC_3_6.py +++ b/src/python_testing/TC_SC_3_6.py @@ -129,7 +129,7 @@ async def test_TC_SC_3_6(self): client_list.append(dev_ctrl) if num_controllers_per_fabric > 1: - new_controllers = await CommissioningBuildingBlocks.CreateControllersOnFabric(fabricAdmin=dev_ctrl.fabricAdmin, adminDevCtrl=dev_ctrl, controllerNodeIds=node_ids, privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, targetNodeId=self.dut_node_id) + new_controllers = await CommissioningBuildingBlocks.CreateControllersOnFabric(fabricAdmin=dev_ctrl.fabricAdmin, adminDevCtrl=dev_ctrl, controllerNodeIds=node_ids, privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, targetNodeId=self.dut_node_id) for controller in new_controllers: controller.name = all_names.pop(0) client_list.extend(new_controllers) @@ -147,7 +147,7 @@ async def test_TC_SC_3_6(self): if num_controllers_per_fabric > 1: new_controllers = await CommissioningBuildingBlocks.CreateControllersOnFabric(fabricAdmin=new_fabric_admin, adminDevCtrl=new_admin_ctrl, - controllerNodeIds=node_ids, privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, targetNodeId=self.dut_node_id) + controllerNodeIds=node_ids, privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, targetNodeId=self.dut_node_id) for controller in new_controllers: controller.name = all_names.pop(0) diff --git a/src/system/BUILD.gn b/src/system/BUILD.gn index 348e3af0ebf5f1..581ed2e23f0bb0 100644 --- a/src/system/BUILD.gn +++ b/src/system/BUILD.gn @@ -67,6 +67,7 @@ buildconfig_header("system_buildconfig") { chip_system_config_mbed_locking = chip_system_config_locking == "mbed" chip_system_config_cmsis_rtos_locking = chip_system_config_locking == "cmsis-rtos" + chip_system_config_zephyr_locking = chip_system_config_locking == "zephyr" chip_system_config_no_locking = chip_system_config_locking == "none" have_clock_gettime = chip_system_config_clock == "clock_gettime" have_clock_settime = have_clock_gettime @@ -85,6 +86,7 @@ buildconfig_header("system_buildconfig") { "CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING=${chip_system_config_freertos_locking}", "CHIP_SYSTEM_CONFIG_MBED_LOCKING=${chip_system_config_mbed_locking}", "CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING=${chip_system_config_cmsis_rtos_locking}", + "CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING=${chip_system_config_zephyr_locking}", "CHIP_SYSTEM_CONFIG_NO_LOCKING=${chip_system_config_no_locking}", "CHIP_SYSTEM_CONFIG_PROVIDE_STATISTICS=${chip_system_config_provide_statistics}", "HAVE_CLOCK_GETTIME=${have_clock_gettime}", diff --git a/src/system/SystemConfig.h b/src/system/SystemConfig.h index c214e922ca84f8..4b8680b8f6b782 100644 --- a/src/system/SystemConfig.h +++ b/src/system/SystemConfig.h @@ -232,6 +232,20 @@ #define CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING 0 #endif /* CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING */ +/** + * @def CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING + * + * @brief + * Use Zephyr native locking primitives. + * + * This is recommended and enabled by default for Zephyr RTOS. + * Alternatively, you can use CHIP_SYSTEM_CONFIG_POSIX_LOCKING and Zephyr POSIX compatibility + * layer, but that solution has higher memory overhead. + */ +#ifndef CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING +#define CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING 0 +#endif /* CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING */ + /** * @def CHIP_SYSTEM_CONFIG_POOL_USE_HEAP * @@ -254,37 +268,29 @@ #define CHIP_SYSTEM_CONFIG_NO_LOCKING 0 #endif /* CHIP_SYSTEM_CONFIG_NO_LOCKING */ -#if !(CHIP_SYSTEM_CONFIG_POSIX_LOCKING || CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING ||CHIP_SYSTEM_CONFIG_NO_LOCKING) -#error "REQUIRED: CHIP_SYSTEM_CONFIG_POSIX_LOCKING || CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING" -#endif // !(CHIP_SYSTEM_CONFIG_POSIX_LOCKING || CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING) - -#if CHIP_SYSTEM_CONFIG_NO_LOCKING && (CHIP_SYSTEM_CONFIG_POSIX_LOCKING || CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING) -#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_NO_LOCKING && (CHIP_SYSTEM_CONFIG_POSIX_LOCKING || CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING)" -#endif // CHIP_SYSTEM_CONFIG_NO_LOCKING && (CHIP_SYSTEM_CONFIG_POSIX_LOCKING || CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING) - -#if CHIP_SYSTEM_CONFIG_POSIX_LOCKING && CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING -#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_POSIX_LOCKING && CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING" -#endif // CHIP_SYSTEM_CONFIG_POSIX_LOCKING && CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING +#if !(CHIP_SYSTEM_CONFIG_POSIX_LOCKING || CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING) +#error "REQUIRED: CHIP_SYSTEM_CONFIG_POSIX_LOCKING || CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING" +#endif // !(CHIP_SYSTEM_CONFIG_POSIX_LOCKING || CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING) -#if CHIP_SYSTEM_CONFIG_POSIX_LOCKING && CHIP_SYSTEM_CONFIG_MBED_LOCKING -#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_POSIX_LOCKING && CHIP_SYSTEM_CONFIG_MBED_LOCKING" -#endif // CHIP_SYSTEM_CONFIG_POSIX_LOCKING && CHIP_SYSTEM_CONFIG_MBED_LOCKING +#if CHIP_SYSTEM_CONFIG_POSIX_LOCKING && (CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING) +#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_POSIX_LOCKING && (CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING)" +#endif // CHIP_SYSTEM_CONFIG_POSIX_LOCKING && (CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING || CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING) -#if CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING && CHIP_SYSTEM_CONFIG_MBED_LOCKING -#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING && CHIP_SYSTEM_CONFIG_MBED_LOCKING" -#endif // CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING && CHIP_SYSTEM_CONFIG_MBED_LOCKING +#if CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING && (CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING) +#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING && (CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING)" +#endif // CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING && (CHIP_SYSTEM_CONFIG_MBED_LOCKING || CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING) -#if CHIP_SYSTEM_CONFIG_POSIX_LOCKING && CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING -#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_POSIX_LOCKING && CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING" -#endif // CHIP_SYSTEM_CONFIG_POSIX_LOCKING && CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING +#if CHIP_SYSTEM_CONFIG_MBED_LOCKING && (CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING) +#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_MBED_LOCKING && (CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING)" +#endif // CHIP_SYSTEM_CONFIG_MBED_LOCKING && (CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING || CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING) -#if CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING && CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING -#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING && CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING" -#endif // CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING && CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING +#if CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING && (CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING) +#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING && (CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING)" +#endif // CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING && (CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING || CHIP_SYSTEM_CONFIG_NO_LOCKING) -#if CHIP_SYSTEM_CONFIG_MBED_LOCKING && CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING -#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_MBED_LOCKING && CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING" -#endif // CHIP_SYSTEM_CONFIG_MBED_LOCKING && CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING +#if CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING && CHIP_SYSTEM_CONFIG_NO_LOCKING +#error "FORBIDDEN: CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING && CHIP_SYSTEM_CONFIG_NO_LOCKING" +#endif // CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING && CHIP_SYSTEM_CONFIG_NO_LOCKING /** * @def CHIP_SYSTEM_HEADER_RESERVE_SIZE diff --git a/src/system/SystemMutex.h b/src/system/SystemMutex.h index 13c8337c6c7ffb..c697ea52b9cc64 100644 --- a/src/system/SystemMutex.h +++ b/src/system/SystemMutex.h @@ -28,9 +28,9 @@ #include // Include dependent headers -#include - +#include #include +#include #if CHIP_SYSTEM_CONFIG_POSIX_LOCKING #include @@ -56,6 +56,10 @@ #include #endif // CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING +#if CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING +#include +#endif + namespace chip { namespace System { @@ -73,8 +77,7 @@ namespace System { class DLL_EXPORT Mutex { public: - Mutex(); - ~Mutex(); + Mutex() = default; static CHIP_ERROR Init(Mutex & aMutex); #if CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING @@ -109,13 +112,14 @@ class DLL_EXPORT Mutex osMutexId_t mCmsisRTOSMutex; #endif // CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING +#if CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING + k_mutex mZephyrMutex; +#endif // CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING + Mutex(const Mutex &) = delete; Mutex & operator=(const Mutex &) = delete; }; -inline Mutex::Mutex() {} -inline Mutex::~Mutex() {} - #if CHIP_SYSTEM_CONFIG_NO_LOCKING inline CHIP_ERROR Init(Mutex & aMutex) { @@ -163,5 +167,22 @@ inline void Mutex::Unlock(void) } #endif // CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING +#if CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING +inline CHIP_ERROR Mutex::Init(Mutex & aMutex) +{ + return System::MapErrorZephyr(k_mutex_init(&aMutex.mZephyrMutex)); +} + +inline void Mutex::Lock() +{ + VerifyOrDie(0 == k_mutex_lock(&mZephyrMutex, K_FOREVER)); +} + +inline void Mutex::Unlock(void) +{ + VerifyOrDie(0 == k_mutex_unlock(&mZephyrMutex)); +} +#endif // CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING + } // namespace System } // namespace chip diff --git a/src/system/system.gni b/src/system/system.gni index f65a610bd88161..e91dd0dee460d3 100644 --- a/src/system/system.gni +++ b/src/system/system.gni @@ -59,6 +59,8 @@ if (chip_system_config_locking == "") { chip_system_config_locking = "mbed" } else if (current_os == "cmsis-rtos") { chip_system_config_locking = "cmsis-rtos" + } else if (current_os == "zephyr") { + chip_system_config_locking = "zephyr" } else if (chip_system_config_use_dispatch == false) { chip_system_config_locking = "posix" } else { @@ -71,8 +73,9 @@ assert( chip_system_config_locking == "freertos" || chip_system_config_locking == "none" || chip_system_config_locking == "mbed" || - chip_system_config_locking == "cmsis-rtos", - "Please select a valid mutex implementation: posix, freertos, mbed, cmsis-rtos, none") + chip_system_config_locking == "cmsis-rtos" || + chip_system_config_locking == "zephyr", + "Please select a valid mutex implementation: posix, freertos, mbed, cmsis-rtos, zephyr, none") assert( chip_system_config_clock == "clock_gettime" || diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index 38876e20dac341..8f61a4bc3c38c3 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -1272,13 +1272,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index b63b342d4889d8..9dc691a1055ab2 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -459,7 +459,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -1584,7 +1584,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=15) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=17) */ \ diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp index 9e2c11a63bd377..fa9cb74877e047 100644 --- a/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp @@ -1092,13 +1092,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h index ee653446210dae..154d25138dfe81 100644 --- a/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h @@ -368,7 +368,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -1108,7 +1108,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=14) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=16) */ \ diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index 504c6d137296ba..09a9bc00c0d718 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -198,15 +198,22 @@ typedef struct _Target chip::DeviceTypeId DeviceType; } Target; -// Struct for AccessControlEntry -typedef struct _AccessControlEntry +// Struct for AccessControlEntryStruct +typedef struct _AccessControlEntryStruct { uint8_t Privilege; uint8_t AuthMode; /* TYPE WARNING: array array defaults to */ uint8_t * Subjects; /* TYPE WARNING: array array defaults to */ uint8_t * Targets; chip::FabricIndex FabricIndex; -} AccessControlEntry; +} AccessControlEntryStruct; + +// Struct for AccessControlExtensionStruct +typedef struct _AccessControlExtensionStruct +{ + chip::ByteSpan Data; + chip::FabricIndex FabricIndex; +} AccessControlExtensionStruct; // Struct for ActionStruct typedef struct _ActionStruct @@ -267,8 +274,8 @@ typedef struct _ChannelInfo // Struct for DeviceTypeStruct typedef struct _DeviceTypeStruct { - chip::DeviceTypeId type; - uint16_t revision; + chip::DeviceTypeId DeviceType; + uint16_t Revision; } DeviceTypeStruct; // Struct for DlCredential @@ -295,13 +302,6 @@ typedef struct _EndpointListStruct /* TYPE WARNING: array array defaults to */ uint8_t * Endpoints; } EndpointListStruct; -// Struct for ExtensionEntry -typedef struct _ExtensionEntry -{ - chip::ByteSpan Data; - chip::FabricIndex FabricIndex; -} ExtensionEntry; - // Struct for FabricDescriptor typedef struct _FabricDescriptor { 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 9de9f23a699f6c..aebe2184331823 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -7580,8 +7580,8 @@ bool emberAfGroupsClusterAddGroupCallback(chip::app::CommandHandler * commandObj /** * @brief Groups Cluster AddGroupResponse Command callback (from server) */ -bool emberAfGroupsClusterAddGroupResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t status, - chip::GroupId groupId); +bool emberAfGroupsClusterAddGroupResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t Status, + chip::GroupId GroupID); /** * @brief Groups Cluster ViewGroup Command callback (from client) */ @@ -7591,8 +7591,8 @@ bool emberAfGroupsClusterViewGroupCallback(chip::app::CommandHandler * commandOb /** * @brief Groups Cluster ViewGroupResponse Command callback (from server) */ -bool emberAfGroupsClusterViewGroupResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t status, - chip::GroupId groupId, chip::CharSpan groupName); +bool emberAfGroupsClusterViewGroupResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t Status, + chip::GroupId GroupID, chip::CharSpan GroupName); /** * @brief Groups Cluster GetGroupMembership Command callback (from client) */ @@ -7603,8 +7603,8 @@ bool emberAfGroupsClusterGetGroupMembershipCallback( * @brief Groups Cluster GetGroupMembershipResponse Command callback (from server) */ bool emberAfGroupsClusterGetGroupMembershipResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - uint8_t capacity, - /* TYPE WARNING: array array defaults to */ uint8_t * groupList); + uint8_t Capacity, + /* TYPE WARNING: array array defaults to */ uint8_t * GroupList); /** * @brief Groups Cluster RemoveGroup Command callback (from client) */ @@ -7615,7 +7615,7 @@ bool emberAfGroupsClusterRemoveGroupCallback(chip::app::CommandHandler * command * @brief Groups Cluster RemoveGroupResponse Command callback (from server) */ bool emberAfGroupsClusterRemoveGroupResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - uint8_t status, chip::GroupId groupId); + uint8_t Status, chip::GroupId GroupID); /** * @brief Groups Cluster RemoveAllGroups Command callback (from client) */ @@ -7912,9 +7912,9 @@ bool emberAfOtaSoftwareUpdateProviderClusterQueryImageCallback( * @brief OTA Software Update Provider Cluster QueryImageResponse Command callback (from server) */ bool emberAfOtaSoftwareUpdateProviderClusterQueryImageResponseCallback( - chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t status, uint32_t delayedActionTime, - chip::CharSpan imageURI, uint32_t softwareVersion, chip::CharSpan softwareVersionString, chip::ByteSpan updateToken, - bool userConsentNeeded, chip::ByteSpan metadataForRequestor); + chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t Status, uint32_t DelayedActionTime, + chip::CharSpan ImageURI, uint32_t SoftwareVersion, chip::CharSpan SoftwareVersionString, chip::ByteSpan UpdateToken, + bool UserConsentNeeded, chip::ByteSpan MetadataForRequestor); /** * @brief OTA Software Update Provider Cluster ApplyUpdateRequest Command callback (from client) */ @@ -7925,8 +7925,8 @@ bool emberAfOtaSoftwareUpdateProviderClusterApplyUpdateRequestCallback( * @brief OTA Software Update Provider Cluster ApplyUpdateResponse Command callback (from server) */ bool emberAfOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback(chip::EndpointId endpoint, - chip::app::CommandSender * commandObj, uint8_t action, - uint32_t delayedActionTime); + chip::app::CommandSender * commandObj, uint8_t Action, + uint32_t DelayedActionTime); /** * @brief OTA Software Update Provider Cluster NotifyUpdateApplied Command callback (from client) */ @@ -7934,11 +7934,11 @@ bool emberAfOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::DecodableType & commandData); /** - * @brief OTA Software Update Requestor Cluster AnnounceOtaProvider Command callback (from client) + * @brief OTA Software Update Requestor Cluster AnnounceOTAProvider Command callback (from client) */ -bool emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback( +bool emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData); + const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::DecodableType & commandData); /** * @brief General Commissioning Cluster ArmFailSafe Command callback (from client) */ @@ -7949,7 +7949,7 @@ bool emberAfGeneralCommissioningClusterArmFailSafeCallback( * @brief General Commissioning Cluster ArmFailSafeResponse Command callback (from server) */ bool emberAfGeneralCommissioningClusterArmFailSafeResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - uint8_t errorCode, chip::CharSpan debugText); + uint8_t ErrorCode, chip::CharSpan DebugText); /** * @brief General Commissioning Cluster SetRegulatoryConfig Command callback (from client) */ @@ -7960,8 +7960,8 @@ bool emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback( * @brief General Commissioning Cluster SetRegulatoryConfigResponse Command callback (from server) */ bool emberAfGeneralCommissioningClusterSetRegulatoryConfigResponseCallback(chip::EndpointId endpoint, - chip::app::CommandSender * commandObj, uint8_t errorCode, - chip::CharSpan debugText); + chip::app::CommandSender * commandObj, uint8_t ErrorCode, + chip::CharSpan DebugText); /** * @brief General Commissioning Cluster CommissioningComplete Command callback (from client) */ @@ -7973,7 +7973,7 @@ bool emberAfGeneralCommissioningClusterCommissioningCompleteCallback( */ bool emberAfGeneralCommissioningClusterCommissioningCompleteResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - uint8_t errorCode, chip::CharSpan debugText); + uint8_t ErrorCode, chip::CharSpan DebugText); /** * @brief Network Commissioning Cluster ScanNetworks 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 a56e91bd7e7ebe..353227918e2f72 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 @@ -206,9 +206,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(LevelControl::StepMode } } -static auto __attribute__((unused)) EnsureKnownEnumValue(AccessControl::AuthMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(AccessControl::AccessControlEntryAuthModeEnum val) { - using EnumType = AccessControl::AuthMode; + using EnumType = AccessControl::AccessControlEntryAuthModeEnum; switch (val) { case EnumType::kPase: @@ -219,32 +219,32 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(AccessControl::AuthMode return static_cast(0); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(AccessControl::ChangeTypeEnum val) +static auto __attribute__((unused)) EnsureKnownEnumValue(AccessControl::AccessControlEntryPrivilegeEnum val) { - using EnumType = AccessControl::ChangeTypeEnum; + using EnumType = AccessControl::AccessControlEntryPrivilegeEnum; switch (val) { - case EnumType::kChanged: - case EnumType::kAdded: - case EnumType::kRemoved: + case EnumType::kView: + case EnumType::kProxyView: + case EnumType::kOperate: + case EnumType::kManage: + case EnumType::kAdminister: return val; default: - return static_cast(3); + return static_cast(0); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(AccessControl::Privilege val) +static auto __attribute__((unused)) EnsureKnownEnumValue(AccessControl::ChangeTypeEnum val) { - using EnumType = AccessControl::Privilege; + using EnumType = AccessControl::ChangeTypeEnum; switch (val) { - case EnumType::kView: - case EnumType::kProxyView: - case EnumType::kOperate: - case EnumType::kManage: - case EnumType::kAdminister: + case EnumType::kChanged: + case EnumType::kAdded: + case EnumType::kRemoved: return val; default: - return static_cast(0); + return static_cast(3); } } 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 aafc877ed0fb3e..c29a4d426ea87d 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 @@ -245,8 +245,8 @@ namespace Binding { namespace AccessControl { -// Enum for AuthMode -enum class AuthMode : uint8_t +// Enum for AccessControlEntryAuthModeEnum +enum class AccessControlEntryAuthModeEnum : uint8_t { kPase = 0x01, kCase = 0x02, @@ -254,17 +254,8 @@ enum class AuthMode : uint8_t kUnknownEnumValue = 0, }; -// Enum for ChangeTypeEnum -enum class ChangeTypeEnum : uint8_t -{ - kChanged = 0x00, - kAdded = 0x01, - kRemoved = 0x02, - kUnknownEnumValue = 3, -}; - -// Enum for Privilege -enum class Privilege : uint8_t +// Enum for AccessControlEntryPrivilegeEnum +enum class AccessControlEntryPrivilegeEnum : uint8_t { kView = 0x01, kProxyView = 0x02, @@ -273,6 +264,15 @@ enum class Privilege : uint8_t kAdminister = 0x05, kUnknownEnumValue = 0, }; + +// Enum for ChangeTypeEnum +enum class ChangeTypeEnum : uint8_t +{ + kChanged = 0x00, + kAdded = 0x01, + kRemoved = 0x02, + kUnknownEnumValue = 3, +}; } // namespace AccessControl namespace Actions { 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 c1c9377c0b94fd..448310efafe87c 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 @@ -202,7 +202,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupName)), groupName)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; @@ -222,8 +222,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; case to_underlying(Fields::kGroupName): ReturnErrorOnFailure(DataModel::Decode(reader, groupName)); @@ -244,7 +244,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -266,8 +266,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kStatus): ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; default: break; @@ -284,7 +284,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -303,8 +303,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; default: break; @@ -322,7 +322,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupName)), groupName)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; @@ -345,8 +345,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kStatus): ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; case to_underlying(Fields::kGroupName): ReturnErrorOnFailure(DataModel::Decode(reader, groupName)); @@ -444,7 +444,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -463,8 +463,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; default: break; @@ -482,7 +482,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -504,8 +504,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kStatus): ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; default: break; @@ -555,7 +555,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupName)), groupName)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; @@ -575,8 +575,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; case to_underlying(Fields::kGroupName): ReturnErrorOnFailure(DataModel::Decode(reader, groupName)); @@ -1756,7 +1756,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEffectId)), effectId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEffectIdentifier)), effectIdentifier)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEffectVariant)), effectVariant)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; @@ -1776,8 +1776,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kEffectId): - ReturnErrorOnFailure(DataModel::Decode(reader, effectId)); + case to_underlying(Fields::kEffectIdentifier): + ReturnErrorOnFailure(DataModel::Decode(reader, effectIdentifier)); break; case to_underlying(Fields::kEffectVariant): ReturnErrorOnFailure(DataModel::Decode(reader, effectVariant)); @@ -2570,7 +2570,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kType)), type)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDeviceType)), deviceType)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRevision)), revision)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; @@ -2591,8 +2591,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kType): - ReturnErrorOnFailure(DataModel::Decode(reader, type)); + case to_underlying(Fields::kDeviceType): + ReturnErrorOnFailure(DataModel::Decode(reader, deviceType)); break; case to_underlying(Fields::kRevision): ReturnErrorOnFailure(DataModel::Decode(reader, revision)); @@ -2819,7 +2819,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Target -namespace AccessControlEntry { +namespace AccessControlEntryStruct { CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & writer, TLV::Tag tag) const { return DoEncode(writer, tag, NullOptional); @@ -2900,8 +2900,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace AccessControlEntry -namespace ExtensionEntry { +} // namespace AccessControlEntryStruct +namespace AccessControlExtensionStruct { CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & writer, TLV::Tag tag) const { return DoEncode(writer, tag, NullOptional); @@ -2961,7 +2961,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace ExtensionEntry +} // namespace AccessControlExtensionStruct } // namespace Structs namespace Commands { @@ -4218,8 +4218,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorId)), vendorId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProductId)), productId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorID)), vendorID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProductID)), productID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSoftwareVersion)), softwareVersion)); ReturnErrorOnFailure( DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProtocolsSupported)), protocolsSupported)); @@ -4247,11 +4247,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kVendorId): - ReturnErrorOnFailure(DataModel::Decode(reader, vendorId)); + case to_underlying(Fields::kVendorID): + ReturnErrorOnFailure(DataModel::Decode(reader, vendorID)); break; - case to_underlying(Fields::kProductId): - ReturnErrorOnFailure(DataModel::Decode(reader, productId)); + case to_underlying(Fields::kProductID): + ReturnErrorOnFailure(DataModel::Decode(reader, productID)); break; case to_underlying(Fields::kSoftwareVersion): ReturnErrorOnFailure(DataModel::Decode(reader, softwareVersion)); @@ -4571,13 +4571,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace Structs namespace Commands { -namespace AnnounceOtaProvider { +namespace AnnounceOTAProvider { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProviderNodeId)), providerNodeId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorId)), vendorId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProviderNodeID)), providerNodeID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorID)), vendorID)); ReturnErrorOnFailure( DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAnnouncementReason)), announcementReason)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMetadataForNode)), metadataForNode)); @@ -4600,11 +4600,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kProviderNodeId): - ReturnErrorOnFailure(DataModel::Decode(reader, providerNodeId)); + case to_underlying(Fields::kProviderNodeID): + ReturnErrorOnFailure(DataModel::Decode(reader, providerNodeID)); break; - case to_underlying(Fields::kVendorId): - ReturnErrorOnFailure(DataModel::Decode(reader, vendorId)); + case to_underlying(Fields::kVendorID): + ReturnErrorOnFailure(DataModel::Decode(reader, vendorID)); break; case to_underlying(Fields::kAnnouncementReason): ReturnErrorOnFailure(DataModel::Decode(reader, announcementReason)); @@ -4624,7 +4624,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(reader.ExitContainer(outer)); return CHIP_NO_ERROR; } -} // namespace AnnounceOtaProvider. +} // namespace AnnounceOTAProvider. } // namespace Commands namespace Attributes { @@ -4632,8 +4632,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::DefaultOtaProviders::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, defaultOtaProviders)); + case Attributes::DefaultOTAProviders::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, defaultOTAProviders)); break; case Attributes::UpdatePossible::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, updatePossible)); 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 d4f3f90d695ce3..f6707991e0dfed 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 @@ -358,7 +358,7 @@ namespace Commands { namespace AddGroup { enum class Fields { - kGroupId = 0, + kGroupID = 0, kGroupName = 1, }; @@ -369,7 +369,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AddGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -385,7 +385,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AddGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -394,7 +394,7 @@ namespace AddGroupResponse { enum class Fields { kStatus = 0, - kGroupId = 1, + kGroupID = 1, }; struct Type @@ -405,7 +405,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } uint8_t status = static_cast(0); - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -421,14 +421,14 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } uint8_t status = static_cast(0); - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AddGroupResponse namespace ViewGroup { enum class Fields { - kGroupId = 0, + kGroupID = 0, }; struct Type @@ -438,7 +438,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ViewGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -453,7 +453,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ViewGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ViewGroup @@ -461,7 +461,7 @@ namespace ViewGroupResponse { enum class Fields { kStatus = 0, - kGroupId = 1, + kGroupID = 1, kGroupName = 2, }; @@ -473,7 +473,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } uint8_t status = static_cast(0); - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -490,7 +490,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } uint8_t status = static_cast(0); - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -565,7 +565,7 @@ struct DecodableType namespace RemoveGroup { enum class Fields { - kGroupId = 0, + kGroupID = 0, }; struct Type @@ -575,7 +575,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RemoveGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -590,7 +590,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RemoveGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveGroup @@ -598,7 +598,7 @@ namespace RemoveGroupResponse { enum class Fields { kStatus = 0, - kGroupId = 1, + kGroupID = 1, }; struct Type @@ -609,7 +609,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } uint8_t status = static_cast(0); - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -625,7 +625,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } uint8_t status = static_cast(0); - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveGroupResponse @@ -660,7 +660,7 @@ struct DecodableType namespace AddGroupIfIdentifying { enum class Fields { - kGroupId = 0, + kGroupID = 0, kGroupName = 1, }; @@ -671,7 +671,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AddGroupIfIdentifying::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -687,7 +687,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AddGroupIfIdentifying::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -1911,8 +1911,8 @@ struct DecodableType namespace OffWithEffect { enum class Fields { - kEffectId = 0, - kEffectVariant = 1, + kEffectIdentifier = 0, + kEffectVariant = 1, }; struct Type @@ -1922,7 +1922,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::OffWithEffect::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - OnOffEffectIdentifier effectId = static_cast(0); + OnOffEffectIdentifier effectIdentifier = static_cast(0); OnOffDelayedAllOffEffectVariant effectVariant = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1938,7 +1938,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::OffWithEffect::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - OnOffEffectIdentifier effectId = static_cast(0); + OnOffEffectIdentifier effectIdentifier = static_cast(0); OnOffDelayedAllOffEffectVariant effectVariant = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -3075,15 +3075,15 @@ namespace Structs { namespace DeviceTypeStruct { enum class Fields { - kType = 0, - kRevision = 1, + kDeviceType = 0, + kRevision = 1, }; struct Type { public: - chip::DeviceTypeId type = static_cast(0); - uint16_t revision = static_cast(0); + chip::DeviceTypeId deviceType = static_cast(0); + uint16_t revision = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -3333,7 +3333,7 @@ struct Type using DecodableType = Type; } // namespace Target -namespace AccessControlEntry { +namespace AccessControlEntryStruct { enum class Fields { kPrivilege = 1, @@ -3346,8 +3346,8 @@ enum class Fields struct Type { public: - Privilege privilege = static_cast(0); - AuthMode authMode = static_cast(0); + AccessControlEntryPrivilegeEnum privilege = static_cast(0); + AccessControlEntryAuthModeEnum authMode = static_cast(0); DataModel::Nullable> subjects; DataModel::Nullable> targets; chip::FabricIndex fabricIndex = static_cast(0); @@ -3368,8 +3368,8 @@ struct Type struct DecodableType { public: - Privilege privilege = static_cast(0); - AuthMode authMode = static_cast(0); + AccessControlEntryPrivilegeEnum privilege = static_cast(0); + AccessControlEntryAuthModeEnum authMode = static_cast(0); DataModel::Nullable> subjects; DataModel::Nullable> targets; chip::FabricIndex fabricIndex = static_cast(0); @@ -3383,8 +3383,8 @@ struct DecodableType void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } }; -} // namespace AccessControlEntry -namespace ExtensionEntry { +} // namespace AccessControlEntryStruct +namespace AccessControlExtensionStruct { enum class Fields { kData = 1, @@ -3414,7 +3414,7 @@ struct Type using DecodableType = Type; -} // namespace ExtensionEntry +} // namespace AccessControlExtensionStruct } // namespace Structs namespace Attributes { @@ -3422,11 +3422,11 @@ namespace Attributes { namespace Acl { struct TypeInfo { - using Type = chip::app::DataModel::List; + using Type = chip::app::DataModel::List; using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> &; static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Acl::Id; } @@ -3436,11 +3436,11 @@ struct TypeInfo namespace Extension { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> &; static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Extension::Id; } @@ -3559,7 +3559,7 @@ struct Type DataModel::Nullable adminNodeID; DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); - DataModel::Nullable latestValue; + DataModel::Nullable latestValue; chip::FabricIndex fabricIndex = static_cast(0); auto GetFabricIndex() const { return fabricIndex; } @@ -3577,7 +3577,7 @@ struct DecodableType DataModel::Nullable adminNodeID; DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); - DataModel::Nullable latestValue; + DataModel::Nullable latestValue; chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -3606,7 +3606,7 @@ struct Type DataModel::Nullable adminNodeID; DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); - DataModel::Nullable latestValue; + DataModel::Nullable latestValue; chip::FabricIndex fabricIndex = static_cast(0); auto GetFabricIndex() const { return fabricIndex; } @@ -3624,7 +3624,7 @@ struct DecodableType DataModel::Nullable adminNodeID; DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); - DataModel::Nullable latestValue; + DataModel::Nullable latestValue; chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -4937,8 +4937,8 @@ namespace Commands { namespace QueryImage { enum class Fields { - kVendorId = 0, - kProductId = 1, + kVendorID = 0, + kProductID = 1, kSoftwareVersion = 2, kProtocolsSupported = 3, kHardwareVersion = 4, @@ -4954,8 +4954,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::QueryImage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - chip::VendorId vendorId = static_cast(0); - uint16_t productId = static_cast(0); + chip::VendorId vendorID = static_cast(0); + uint16_t productID = static_cast(0); uint32_t softwareVersion = static_cast(0); DataModel::List protocolsSupported; Optional hardwareVersion; @@ -4976,8 +4976,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::QueryImage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - chip::VendorId vendorId = static_cast(0); - uint16_t productId = static_cast(0); + chip::VendorId vendorID = static_cast(0); + uint16_t productID = static_cast(0); uint32_t softwareVersion = static_cast(0); DataModel::DecodableList protocolsSupported; Optional hardwareVersion; @@ -5237,19 +5237,19 @@ using DecodableType = Type; namespace Commands { // Forward-declarations so we can reference these later. -namespace AnnounceOtaProvider { +namespace AnnounceOTAProvider { struct Type; struct DecodableType; -} // namespace AnnounceOtaProvider +} // namespace AnnounceOTAProvider } // namespace Commands namespace Commands { -namespace AnnounceOtaProvider { +namespace AnnounceOTAProvider { enum class Fields { - kProviderNodeId = 0, - kVendorId = 1, + kProviderNodeID = 0, + kVendorID = 1, kAnnouncementReason = 2, kMetadataForNode = 3, kEndpoint = 4, @@ -5259,11 +5259,11 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AnnounceOtaProvider::Id; } + static constexpr CommandId GetCommandId() { return Commands::AnnounceOTAProvider::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - chip::NodeId providerNodeId = static_cast(0); - chip::VendorId vendorId = static_cast(0); + chip::NodeId providerNodeID = static_cast(0); + chip::VendorId vendorID = static_cast(0); OTAAnnouncementReason announcementReason = static_cast(0); Optional metadataForNode; chip::EndpointId endpoint = static_cast(0); @@ -5278,22 +5278,22 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::AnnounceOtaProvider::Id; } + static constexpr CommandId GetCommandId() { return Commands::AnnounceOTAProvider::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - chip::NodeId providerNodeId = static_cast(0); - chip::VendorId vendorId = static_cast(0); + chip::NodeId providerNodeID = static_cast(0); + chip::VendorId vendorID = static_cast(0); OTAAnnouncementReason announcementReason = static_cast(0); Optional metadataForNode; chip::EndpointId endpoint = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace AnnounceOtaProvider +}; // namespace AnnounceOTAProvider } // namespace Commands namespace Attributes { -namespace DefaultOtaProviders { +namespace DefaultOTAProviders { struct TypeInfo { using Type = chip::app::DataModel::List; @@ -5303,10 +5303,10 @@ struct TypeInfo chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> &; static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DefaultOtaProviders::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultOTAProviders::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace DefaultOtaProviders +} // namespace DefaultOTAProviders namespace UpdatePossible { struct TypeInfo { @@ -5382,7 +5382,7 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::DefaultOtaProviders::TypeInfo::DecodableType defaultOtaProviders; + Attributes::DefaultOTAProviders::TypeInfo::DecodableType defaultOTAProviders; Attributes::UpdatePossible::TypeInfo::DecodableType updatePossible = static_cast(0); Attributes::UpdateState::TypeInfo::DecodableType updateState = static_cast(0); 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 901dc911960a6f..c03ad1bec6d5db 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 @@ -706,9 +706,9 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace OtaSoftwareUpdateRequestor { namespace Attributes { -namespace DefaultOtaProviders { +namespace DefaultOTAProviders { static constexpr AttributeId Id = 0x00000000; -} // namespace DefaultOtaProviders +} // namespace DefaultOTAProviders namespace UpdatePossible { static constexpr AttributeId Id = 0x00000001; 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 fc78c7cc294ea7..22576400404724 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 @@ -334,9 +334,9 @@ static constexpr CommandId Id = 0x00000004; namespace OtaSoftwareUpdateRequestor { namespace Commands { -namespace AnnounceOtaProvider { +namespace AnnounceOTAProvider { static constexpr CommandId Id = 0x00000000; -} // namespace AnnounceOtaProvider +} // namespace AnnounceOTAProvider } // namespace Commands } // namespace OtaSoftwareUpdateRequestor diff --git a/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h index 70ca3e88c274a6..62553f97b4e8ed 100644 --- a/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h @@ -41,11 +41,12 @@ typedef void (*BindingAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAclListAttributeCallback)( void * context, - const chip::app::DataModel::DecodableList & - data); + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & data); typedef void (*AccessControlExtensionListAttributeCallback)( void * context, - const chip::app::DataModel::DecodableList & data); + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & data); typedef void (*AccessControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAcceptedCommandListListAttributeCallback)( diff --git a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/IMClusterCommandHandler.cpp index d9f3b89b0681e2..0c20b9740d0f3b 100644 --- a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/IMClusterCommandHandler.cpp @@ -558,13 +558,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h index 97b72598414f14..23daa85192a4cc 100644 --- a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h @@ -154,7 +154,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -501,7 +501,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_colortemperaturelight_hbUnzYVeyn/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_colortemperaturelight_hbUnzYVeyn/zap-generated/IMClusterCommandHandler.cpp index 61d9c9b81b531f..868bc7cb21271c 100644 --- a/zzz_generated/chef-rootnode_colortemperaturelight_hbUnzYVeyn/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_colortemperaturelight_hbUnzYVeyn/zap-generated/IMClusterCommandHandler.cpp @@ -814,13 +814,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_colortemperaturelight_hbUnzYVeyn/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_colortemperaturelight_hbUnzYVeyn/zap-generated/endpoint_config.h index 8a0446d0cf8c7e..6ac4b6c00baacb 100644 --- a/zzz_generated/chef-rootnode_colortemperaturelight_hbUnzYVeyn/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_colortemperaturelight_hbUnzYVeyn/zap-generated/endpoint_config.h @@ -165,7 +165,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -381,7 +381,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/IMClusterCommandHandler.cpp index c2427940edeef4..bea4f740099def 100644 --- a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h index 252d4b7be03d33..a3be9e1b292b00 100644 --- a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -335,7 +335,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/IMClusterCommandHandler.cpp index eb70c21c2224cf..851668df3cf66f 100644 --- a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/IMClusterCommandHandler.cpp @@ -605,13 +605,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h index f911ba6ae1e50d..ad2497d999d8b7 100644 --- a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h @@ -154,7 +154,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -364,7 +364,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/IMClusterCommandHandler.cpp index f6d348ae203a0f..c4d9f49ad1f9cb 100644 --- a/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/IMClusterCommandHandler.cpp @@ -551,13 +551,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/endpoint_config.h index 6c0dd496a190f0..a3c18b0f8c1ba1 100644 --- a/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/endpoint_config.h @@ -156,7 +156,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -360,7 +360,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/IMClusterCommandHandler.cpp index ce86c480a54072..42621aac15f8f7 100644 --- a/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/IMClusterCommandHandler.cpp @@ -805,13 +805,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h index c5a1d8603c6b8e..98a23bb9adcecc 100644 --- a/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h @@ -160,7 +160,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -399,7 +399,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_fan_7N2TobIlOX/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_fan_7N2TobIlOX/zap-generated/IMClusterCommandHandler.cpp index 2cfd18584560a2..761a2acdec4472 100644 --- a/zzz_generated/chef-rootnode_fan_7N2TobIlOX/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_fan_7N2TobIlOX/zap-generated/IMClusterCommandHandler.cpp @@ -514,13 +514,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_fan_7N2TobIlOX/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_fan_7N2TobIlOX/zap-generated/endpoint_config.h index 631f59bc67fff7..5782ccff897af0 100644 --- a/zzz_generated/chef-rootnode_fan_7N2TobIlOX/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_fan_7N2TobIlOX/zap-generated/endpoint_config.h @@ -165,7 +165,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -374,7 +374,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/IMClusterCommandHandler.cpp index c2427940edeef4..bea4f740099def 100644 --- a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h index 1daa88c4ede41b..7207b068315268 100644 --- a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -333,7 +333,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/IMClusterCommandHandler.cpp index eb70c21c2224cf..851668df3cf66f 100644 --- a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/IMClusterCommandHandler.cpp @@ -605,13 +605,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h index 78b54e5d6fd663..a08057b8119ee6 100644 --- a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h @@ -157,7 +157,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -377,7 +377,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/IMClusterCommandHandler.cpp index c2427940edeef4..bea4f740099def 100644 --- a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h index f5d06cd8e5af27..be36b3fbcc9986 100644 --- a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -334,7 +334,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/IMClusterCommandHandler.cpp index c2427940edeef4..bea4f740099def 100644 --- a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h index 48a1ed8d839765..5da1040bd17fd3 100644 --- a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -332,7 +332,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/IMClusterCommandHandler.cpp index c2427940edeef4..bea4f740099def 100644 --- a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h index 123465dcfa155a..4979f720e979c4 100644 --- a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -335,7 +335,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/IMClusterCommandHandler.cpp index eb70c21c2224cf..851668df3cf66f 100644 --- a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/IMClusterCommandHandler.cpp @@ -605,13 +605,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h index ce8b09a9f15200..c74181bbaa46dc 100644 --- a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h @@ -154,7 +154,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -364,7 +364,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/IMClusterCommandHandler.cpp index 2531ec31ef89f5..8837e86d1e212b 100644 --- a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h index 033f01df5cb44c..483b0218b7396e 100644 --- a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -338,7 +338,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/IMClusterCommandHandler.cpp index 2531ec31ef89f5..8837e86d1e212b 100644 --- a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h index eb1983060821e8..9bb0327807d64e 100644 --- a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -344,7 +344,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/IMClusterCommandHandler.cpp index c2427940edeef4..bea4f740099def 100644 --- a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h index ce32ab8a9c11ff..a4f8b57db09486 100644 --- a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -338,7 +338,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/IMClusterCommandHandler.cpp index eb70c21c2224cf..851668df3cf66f 100644 --- a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/IMClusterCommandHandler.cpp @@ -605,13 +605,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h index 69ab7e3458da2c..36c0ef11138e79 100644 --- a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -347,7 +347,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/IMClusterCommandHandler.cpp index c2427940edeef4..bea4f740099def 100644 --- a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h index 69ef078fd7297f..44079cb92c90f0 100644 --- a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -332,7 +332,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/IMClusterCommandHandler.cpp index 6b8e2069af3907..6ed81bc986df6a 100644 --- a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h index a889c85efb490f..c4a339cf3e0269 100644 --- a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h @@ -171,7 +171,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -410,7 +410,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/IMClusterCommandHandler.cpp index ee2a247f44ddde..78f899aa574a0f 100644 --- a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h index ccc320afac2102..08d2013599159b 100644 --- a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -366,7 +366,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index fb94745141a2cb..845ea56ff454f9 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -217,7 +217,7 @@ class GroupsAddGroup : public ClusterCommand public: GroupsAddGroup(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-group", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); AddArgument("GroupName", &mRequest.groupName); ClusterCommand::AddArguments(); } @@ -248,7 +248,7 @@ class GroupsViewGroup : public ClusterCommand public: GroupsViewGroup(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("view-group", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); ClusterCommand::AddArguments(); } @@ -310,7 +310,7 @@ class GroupsRemoveGroup : public ClusterCommand public: GroupsRemoveGroup(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-group", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); ClusterCommand::AddArguments(); } @@ -370,7 +370,7 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand GroupsAddGroupIfIdentifying(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-group-if-identifying", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); AddArgument("GroupName", &mRequest.groupName); ClusterCommand::AddArguments(); } @@ -870,7 +870,7 @@ class OnOffOffWithEffect : public ClusterCommand public: OnOffOffWithEffect(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("off-with-effect", credsIssuerConfig) { - AddArgument("EffectId", 0, UINT8_MAX, &mRequest.effectId); + AddArgument("EffectIdentifier", 0, UINT8_MAX, &mRequest.effectIdentifier); AddArgument("EffectVariant", 0, UINT8_MAX, &mRequest.effectVariant); ClusterCommand::AddArguments(); } @@ -1911,8 +1911,8 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand OtaSoftwareUpdateProviderQueryImage(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("query-image", credsIssuerConfig), mComplex_ProtocolsSupported(&mRequest.protocolsSupported) { - AddArgument("VendorId", 0, UINT16_MAX, &mRequest.vendorId); - AddArgument("ProductId", 0, UINT16_MAX, &mRequest.productId); + AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); + AddArgument("ProductID", 0, UINT16_MAX, &mRequest.productID); AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); AddArgument("ProtocolsSupported", &mComplex_ProtocolsSupported); AddArgument("HardwareVersion", 0, UINT16_MAX, &mRequest.hardwareVersion); @@ -2010,10 +2010,10 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand | Cluster OtaSoftwareUpdateRequestor | 0x002A | |------------------------------------------------------------------------------| | Commands: | | -| * AnnounceOtaProvider | 0x00 | +| * AnnounceOTAProvider | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * DefaultOtaProviders | 0x0000 | +| * DefaultOTAProviders | 0x0000 | | * UpdatePossible | 0x0001 | | * UpdateState | 0x0002 | | * UpdateStateProgress | 0x0003 | @@ -2030,16 +2030,16 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command AnnounceOtaProvider + * Command AnnounceOTAProvider */ -class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ClusterCommand +class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand { public: - OtaSoftwareUpdateRequestorAnnounceOtaProvider(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("announce-ota-provider", credsIssuerConfig) + OtaSoftwareUpdateRequestorAnnounceOTAProvider(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("announce-otaprovider", credsIssuerConfig) { - AddArgument("ProviderNodeId", 0, UINT64_MAX, &mRequest.providerNodeId); - AddArgument("VendorId", 0, UINT16_MAX, &mRequest.vendorId); + AddArgument("ProviderNodeID", 0, UINT64_MAX, &mRequest.providerNodeID); + AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); AddArgument("AnnouncementReason", 0, UINT8_MAX, &mRequest.announcementReason); AddArgument("MetadataForNode", &mRequest.metadataForNode); AddArgument("Endpoint", 0, UINT16_MAX, &mRequest.endpoint); @@ -2061,7 +2061,7 @@ class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ClusterCommand } private: - chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type mRequest; + chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type mRequest; }; /*----------------------------------------------------------------------------*\ @@ -8860,10 +8860,10 @@ void registerClusterAccessControl(Commands & commands, CredentialIssuerCommands make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // make_unique>>( + chip::app::DataModel::List>>( Id, "acl", Attributes::Acl::Id, credsIssuerConfig), // make_unique>>( + chip::app::DataModel::List>>( Id, "extension", Attributes::Extension::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "acl", Attributes::Acl::Id, credsIssuerConfig), // @@ -9092,12 +9092,12 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands, CredentialIs // Commands // make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "default-ota-providers", Attributes::DefaultOtaProviders::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), // @@ -9109,9 +9109,9 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands, CredentialIs make_unique>(Id, credsIssuerConfig), // make_unique>>( - Id, "default-ota-providers", Attributes::DefaultOtaProviders::Id, credsIssuerConfig), // + Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "default-ota-providers", Attributes::DefaultOtaProviders::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), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 75c96256835e13..31abe5f573b673 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -20,19 +20,19 @@ #include CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::AccessControl::Structs::AccessControlEntry::Type & request, + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::Type & request, Json::Value & value) { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.privilege", "privilege", value.isMember("privilege"))); + ComplexArgumentParser::EnsureMemberExist("AccessControlEntryStruct.privilege", "privilege", value.isMember("privilege"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.authMode", "authMode", value.isMember("authMode"))); + ComplexArgumentParser::EnsureMemberExist("AccessControlEntryStruct.authMode", "authMode", value.isMember("authMode"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.subjects", "subjects", value.isMember("subjects"))); + ComplexArgumentParser::EnsureMemberExist("AccessControlEntryStruct.subjects", "subjects", value.isMember("subjects"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.targets", "targets", value.isMember("targets"))); + ComplexArgumentParser::EnsureMemberExist("AccessControlEntryStruct.targets", "targets", value.isMember("targets"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "privilege"); @@ -56,7 +56,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, return CHIP_NO_ERROR; } -void ComplexArgumentParser::Finalize(chip::app::Clusters::AccessControl::Structs::AccessControlEntry::Type & request) +void ComplexArgumentParser::Finalize(chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::Type & request) { ComplexArgumentParser::Finalize(request.privilege); ComplexArgumentParser::Finalize(request.authMode); @@ -64,6 +64,33 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::AccessControl::Structs ComplexArgumentParser::Finalize(request.targets); ComplexArgumentParser::Finalize(request.fabricIndex); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("AccessControlExtensionStruct.data", "data", value.isMember("data"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "data"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.data, value["data"])); + + if (value.isMember("fabricIndex")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.fabricIndex, value["fabricIndex"])); + } + + return CHIP_NO_ERROR; +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.data); + ComplexArgumentParser::Finalize(request.fabricIndex); +} CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Actions::Structs::ActionStruct::Type & request, Json::Value & value) { @@ -476,13 +503,14 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DeviceTypeStruct.type", "type", value.isMember("type"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("DeviceTypeStruct.deviceType", "deviceType", value.isMember("deviceType"))); ReturnErrorOnFailure( ComplexArgumentParser::EnsureMemberExist("DeviceTypeStruct.revision", "revision", value.isMember("revision"))); char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "type"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.type, value["type"])); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "deviceType"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.deviceType, value["deviceType"])); snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "revision"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.revision, value["revision"])); @@ -492,7 +520,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, void ComplexArgumentParser::Finalize(chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::Type & request) { - ComplexArgumentParser::Finalize(request.type); + ComplexArgumentParser::Finalize(request.deviceType); ComplexArgumentParser::Finalize(request.revision); } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, @@ -635,32 +663,6 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::Actions::Structs::Endp ComplexArgumentParser::Finalize(request.type); ComplexArgumentParser::Finalize(request.endpoints); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::AccessControl::Structs::ExtensionEntry::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ExtensionEntry.data", "data", value.isMember("data"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "data"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.data, value["data"])); - - if (value.isMember("fabricIndex")) - { - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.fabricIndex, value["fabricIndex"])); - } - - return CHIP_NO_ERROR; -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::AccessControl::Structs::ExtensionEntry::Type & request) -{ - ComplexArgumentParser::Finalize(request.data); - ComplexArgumentParser::Finalize(request.fabricIndex); -} CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::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 c67a7630e33519..84df4a86847d1c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -22,10 +22,15 @@ #include #include -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::AccessControl::Structs::AccessControlEntry::Type & request, +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::Type & request, Json::Value & value); -static void Finalize(chip::app::Clusters::AccessControl::Structs::AccessControlEntry::Type & request); +static void Finalize(chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::Type & request); +static CHIP_ERROR Setup(const char * label, + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Actions::Structs::ActionStruct::Type & request, Json::Value & value); @@ -104,10 +109,6 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Actions::Struct Json::Value & value); static void Finalize(chip::app::Clusters::Actions::Structs::EndpointListStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::AccessControl::Structs::ExtensionEntry::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::AccessControl::Structs::ExtensionEntry::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::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 4010f1b0e29c32..15e1dc60dc5ba4 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -21,8 +21,9 @@ using namespace chip::app::Clusters; -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::AccessControl::Structs::AccessControlEntry::DecodableType & value) +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { @@ -69,6 +70,31 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("Data", indent + 1, value.data); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Data'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricIndex'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::Actions::Structs::ActionStruct::DecodableType & value) { @@ -471,10 +497,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Type", indent + 1, value.type); + CHIP_ERROR err = LogValue("DeviceType", indent + 1, value.deviceType); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Type'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DeviceType'"); return err; } } @@ -634,30 +660,6 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::AccessControl::Structs::ExtensionEntry::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("Data", indent + 1, value.data); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Data'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("FabricIndex", indent + 1, value.fabricIndex); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricIndex'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & value) { @@ -3602,7 +3604,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupId", indent + 1, value.groupId)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } @@ -3611,7 +3613,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupId", indent + 1, value.groupId)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); ReturnErrorOnFailure(DataModelLogger::LogValue("groupName", indent + 1, value.groupName)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -3630,7 +3632,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupId", indent + 1, value.groupId)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } @@ -4701,13 +4703,16 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP switch (path.mAttributeId) { case AccessControl::Attributes::Acl::Id: { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACL", 1, value); } case AccessControl::Attributes::Extension::Id: { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Extension", 1, value); } @@ -4965,12 +4970,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP case OtaSoftwareUpdateRequestor::Id: { switch (path.mAttributeId) { - case OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::Id: { + case OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id: { chip::app::DataModel::DecodableList< chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DefaultOtaProviders", 1, value); + return DataModelLogger::LogValue("DefaultOTAProviders", 1, value); } case OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id: { bool value; 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 26136d48f6cc71..1683e2255b9d41 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -21,7 +21,9 @@ #include static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::AccessControl::Structs::AccessControlEntry::DecodableType & value); + const chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Actions::Structs::ActionStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, @@ -61,8 +63,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::TimeSynchronization::Structs::DstOffsetType::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Actions::Structs::EndpointListStruct::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::AccessControl::Structs::ExtensionEntry::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index fcd53dfa94f3b7..d6f7eef25da072 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -616,7 +616,8 @@ class TestAccessControlClusterSuite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -767,7 +768,8 @@ class TestAccessControlClusterSuite : public TestCommand case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -794,7 +796,8 @@ class TestAccessControlClusterSuite : public TestCommand case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -815,7 +818,8 @@ class TestAccessControlClusterSuite : public TestCommand case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -836,7 +840,8 @@ class TestAccessControlClusterSuite : public TestCommand case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -857,7 +862,8 @@ class TestAccessControlClusterSuite : public TestCommand case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -878,7 +884,8 @@ class TestAccessControlClusterSuite : public TestCommand case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -899,7 +906,8 @@ class TestAccessControlClusterSuite : public TestCommand case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -920,7 +928,8 @@ class TestAccessControlClusterSuite : public TestCommand case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -1071,7 +1080,8 @@ class TestAccessControlClusterSuite : public TestCommand case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -1135,14 +1145,17 @@ class TestAccessControlClusterSuite : public TestCommand case 1: { LogStep(1, "Write entries"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(3); + auto * listHolder_0 = + new ListHolder(3); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNonNull(); @@ -1172,8 +1185,10 @@ class TestAccessControlClusterSuite : public TestCommand } listHolder_0->mList[0].fabricIndex = 0U; - listHolder_0->mList[1].privilege = static_cast(1); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNonNull(); { @@ -1213,8 +1228,10 @@ class TestAccessControlClusterSuite : public TestCommand } listHolder_0->mList[1].fabricIndex = 0U; - listHolder_0->mList[2].privilege = static_cast(3); - listHolder_0->mList[2].authMode = static_cast(3); + listHolder_0->mList[2].privilege = + static_cast(3); + listHolder_0->mList[2].authMode = + static_cast(3); listHolder_0->mList[2].subjects.SetNonNull(); { @@ -1254,7 +1271,7 @@ class TestAccessControlClusterSuite : public TestCommand } listHolder_0->mList[2].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 3); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -1268,20 +1285,25 @@ class TestAccessControlClusterSuite : public TestCommand case 3: { LogStep(3, "Write entries empty lists"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - listHolder_0->mList[1].privilege = static_cast(1); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNonNull(); listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(); @@ -1291,7 +1313,7 @@ class TestAccessControlClusterSuite : public TestCommand chip::app::DataModel::List(); listHolder_0->mList[1].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -1305,25 +1327,30 @@ class TestAccessControlClusterSuite : public TestCommand case 5: { LogStep(5, "Write entry invalid privilege"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - listHolder_0->mList[1].privilege = static_cast(5); - listHolder_0->mList[1].authMode = static_cast(3); + listHolder_0->mList[1].privilege = + static_cast(5); + listHolder_0->mList[1].authMode = + static_cast(3); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -1337,25 +1364,30 @@ class TestAccessControlClusterSuite : public TestCommand case 7: { LogStep(7, "Write entry invalid auth mode"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - listHolder_0->mList[1].privilege = static_cast(1); - listHolder_0->mList[1].authMode = static_cast(1); + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(1); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -1369,20 +1401,25 @@ class TestAccessControlClusterSuite : public TestCommand case 9: { LogStep(9, "Write entry invalid subject"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - listHolder_0->mList[1].privilege = static_cast(1); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNonNull(); { @@ -1394,7 +1431,7 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -1408,20 +1445,25 @@ class TestAccessControlClusterSuite : public TestCommand case 11: { LogStep(11, "Write entry invalid target"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - listHolder_0->mList[1].privilege = static_cast(1); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNonNull(); @@ -1439,7 +1481,7 @@ class TestAccessControlClusterSuite : public TestCommand } listHolder_0->mList[1].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -1453,20 +1495,25 @@ class TestAccessControlClusterSuite : public TestCommand case 13: { LogStep(13, "Write entry too many subjects"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - listHolder_0->mList[1].privilege = static_cast(1); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNonNull(); { @@ -1497,7 +1544,7 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -1511,20 +1558,25 @@ class TestAccessControlClusterSuite : public TestCommand case 15: { LogStep(15, "Write entry too many targets"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - listHolder_0->mList[1].privilege = static_cast(1); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNonNull(); @@ -1638,7 +1690,7 @@ class TestAccessControlClusterSuite : public TestCommand } listHolder_0->mList[1].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -1652,14 +1704,17 @@ class TestAccessControlClusterSuite : public TestCommand case 17: { LogStep(17, "Write too many entries"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(4); + auto * listHolder_0 = + new ListHolder(4); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNonNull(); @@ -1689,8 +1744,10 @@ class TestAccessControlClusterSuite : public TestCommand } listHolder_0->mList[0].fabricIndex = 0U; - listHolder_0->mList[1].privilege = static_cast(1); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNonNull(); { @@ -1730,8 +1787,10 @@ class TestAccessControlClusterSuite : public TestCommand } listHolder_0->mList[1].fabricIndex = 0U; - listHolder_0->mList[2].privilege = static_cast(3); - listHolder_0->mList[2].authMode = static_cast(3); + listHolder_0->mList[2].privilege = + static_cast(3); + listHolder_0->mList[2].authMode = + static_cast(3); listHolder_0->mList[2].subjects.SetNonNull(); { @@ -1771,8 +1830,10 @@ class TestAccessControlClusterSuite : public TestCommand } listHolder_0->mList[2].fabricIndex = 0U; - listHolder_0->mList[3].privilege = static_cast(1); - listHolder_0->mList[3].authMode = static_cast(2); + listHolder_0->mList[3].privilege = + static_cast(1); + listHolder_0->mList[3].authMode = + static_cast(2); listHolder_0->mList[3].subjects.SetNonNull(); { @@ -1812,7 +1873,7 @@ class TestAccessControlClusterSuite : public TestCommand } listHolder_0->mList[3].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 4); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -1826,19 +1887,22 @@ class TestAccessControlClusterSuite : public TestCommand case 19: { LogStep(19, "Restore ACL"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -2319,7 +2383,8 @@ class Test_TC_ACL_2_3Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -2334,7 +2399,8 @@ class Test_TC_ACL_2_3Suite : public TestCommand case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -2354,7 +2420,8 @@ class Test_TC_ACL_2_3Suite : public TestCommand case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -2381,7 +2448,8 @@ class Test_TC_ACL_2_3Suite : public TestCommand case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -2432,7 +2500,8 @@ class Test_TC_ACL_2_3Suite : public TestCommand case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -2452,7 +2521,8 @@ class Test_TC_ACL_2_3Suite : public TestCommand case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -2500,17 +2570,18 @@ class Test_TC_ACL_2_3Suite : public TestCommand "AccessControlExtensionStruct containing 1 element 1. struct: Data field: D_OK_EMPTY : 1718"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); listHolder_0->mList[0].data = mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, @@ -2530,10 +2601,11 @@ class Test_TC_ACL_2_3Suite : public TestCommand "17320612063686172737472696E670018"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); listHolder_0->mList[0].data = mDOkSingle.HasValue() @@ -2546,7 +2618,7 @@ class Test_TC_ACL_2_3Suite : public TestCommand 71); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, @@ -2567,10 +2639,11 @@ class Test_TC_ACL_2_3Suite : public TestCommand "C656D656E7420616761696E2E2E2E2E2E0018"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); listHolder_0->mList[0].data = mDOkFull.HasValue() @@ -2585,7 +2658,7 @@ class Test_TC_ACL_2_3Suite : public TestCommand 128); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, @@ -2606,10 +2679,11 @@ class Test_TC_ACL_2_3Suite : public TestCommand "C656D656E7420616761696E2E2E2E2E2E2E0018"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); listHolder_0->mList[0].data = mDBadLength.HasValue() @@ -2624,7 +2698,7 @@ class Test_TC_ACL_2_3Suite : public TestCommand 129); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, @@ -2636,17 +2710,18 @@ class Test_TC_ACL_2_3Suite : public TestCommand "AccessControlExtensionStruct containing 1 element 1. struct Data field: D_BAD_STRUCT : 1518"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); listHolder_0->mList[0].data = mDBadStruct.HasValue() ? mDBadStruct.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x15\x18"), 2); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, @@ -2660,10 +2735,11 @@ class Test_TC_ACL_2_3Suite : public TestCommand "0617320612063686172737472696E670018"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); listHolder_0->mList[0].data = mDBadList.HasValue() @@ -2676,7 +2752,7 @@ class Test_TC_ACL_2_3Suite : public TestCommand 72); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, @@ -2690,10 +2766,11 @@ class Test_TC_ACL_2_3Suite : public TestCommand "86172737472696E670018"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); listHolder_0->mList[0].data = mDBadElem.HasValue() @@ -2705,7 +2782,7 @@ class Test_TC_ACL_2_3Suite : public TestCommand 65); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, @@ -2719,10 +2796,11 @@ class Test_TC_ACL_2_3Suite : public TestCommand "7320612063686172737472696E670018FF"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); listHolder_0->mList[0].data = mDBadOverflow.HasValue() @@ -2735,7 +2813,7 @@ class Test_TC_ACL_2_3Suite : public TestCommand 72); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, @@ -2749,10 +2827,11 @@ class Test_TC_ACL_2_3Suite : public TestCommand "17320612063686172737472696E6700"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); listHolder_0->mList[0].data = mDBadUnderflow.HasValue() @@ -2765,7 +2844,7 @@ class Test_TC_ACL_2_3Suite : public TestCommand 70); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, @@ -2777,17 +2856,18 @@ class Test_TC_ACL_2_3Suite : public TestCommand "AccessControlExtensionStruct containing 1 element 1.struct Data field: D_BAD_NONE"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); listHolder_0->mList[0].data = mDBadNone.HasValue() ? mDBadNone.Value() : chip::ByteSpan(chip::Uint8::from_const_char(""), 0); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, @@ -2803,10 +2883,11 @@ class Test_TC_ACL_2_3Suite : public TestCommand "612063686172737472696E670018"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); listHolder_0->mList[0].data = @@ -2823,7 +2904,7 @@ class Test_TC_ACL_2_3Suite : public TestCommand 71); listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, @@ -2839,9 +2920,9 @@ class Test_TC_ACL_2_3Suite : public TestCommand LogStep(18, "TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is an empty list"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; - value = chip::app::DataModel::List(); + value = chip::app::DataModel::List(); return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } @@ -29867,14 +29948,17 @@ class OTA_SuccessfulTransferSuite : public TestCommand case 4: { LogStep(4, "Install ACL for QueryImage"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNonNull(); { @@ -29886,8 +29970,10 @@ class OTA_SuccessfulTransferSuite : public TestCommand listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNonNull(); @@ -29906,7 +29992,7 @@ class OTA_SuccessfulTransferSuite : public TestCommand } listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -29937,13 +30023,13 @@ class OTA_SuccessfulTransferSuite : public TestCommand case 8: { LogStep(8, "Send an announce OTA provider command to the requestor"); ListFreer listFreer; - chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type value; - value.providerNodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; - value.vendorId = static_cast(0); + chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type value; + value.providerNodeID = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; + value.vendorID = static_cast(0); value.announcementReason = static_cast(0); value.endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0U; return SendCommand(kIdentityAlpha, GetEndpoint(0), OtaSoftwareUpdateRequestor::Id, - OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Id, value, chip::NullOptional + OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id, value, chip::NullOptional ); } @@ -61122,7 +61208,7 @@ class TestDescriptorClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("deviceTypeList", iter_0, 0)); - VerifyOrReturn(CheckValue("deviceTypeList[0].type", iter_0.GetValue().type, 22UL)); + VerifyOrReturn(CheckValue("deviceTypeList[0].deviceType", iter_0.GetValue().deviceType, 22UL)); VerifyOrReturn(CheckValue("deviceTypeList[0].revision", iter_0.GetValue().revision, 1U)); VerifyOrReturn(CheckNoMoreListItems("deviceTypeList", iter_0, 1)); } @@ -64758,14 +64844,17 @@ class TestAccessControlConstraintsSuite : public TestCommand case 1: { LogStep(1, "Constraint error: PASE reserved for future (TC-ACL-2.4 step 29)"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNonNull(); { @@ -64777,15 +64866,17 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(1); + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(1); listHolder_0->mList[1].subjects.SetNonNull(); listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(); listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -64794,14 +64885,17 @@ class TestAccessControlConstraintsSuite : public TestCommand case 2: { LogStep(2, "Constraint error: Invalid combination administer + group (TC-ACL-2.4 step 31)"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNonNull(); { @@ -64813,15 +64907,17 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(5); - listHolder_0->mList[1].authMode = static_cast(3); + listHolder_0->mList[1].privilege = + static_cast(5); + listHolder_0->mList[1].authMode = + static_cast(3); listHolder_0->mList[1].subjects.SetNonNull(); listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(); listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -64830,14 +64926,17 @@ class TestAccessControlConstraintsSuite : public TestCommand case 3: { LogStep(3, "Constraint error: Invalid auth mode (TC-ACL-2.4 step 33)"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNonNull(); { @@ -64849,15 +64948,17 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(4); + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(4); listHolder_0->mList[1].subjects.SetNonNull(); listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(); listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -64866,14 +64967,17 @@ class TestAccessControlConstraintsSuite : public TestCommand case 4: { LogStep(4, "Constraint error: Invalid subject (TC-ACL-2.4 step 34)"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNonNull(); { @@ -64885,8 +64989,10 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNonNull(); { @@ -64898,7 +65004,7 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -64907,14 +65013,17 @@ class TestAccessControlConstraintsSuite : public TestCommand case 5: { LogStep(5, "Constraint error: Invalid target (TC-ACL-2.4 step 38)"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNonNull(); { @@ -64926,8 +65035,10 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNonNull(); @@ -64945,7 +65056,7 @@ class TestAccessControlConstraintsSuite : public TestCommand } listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -64954,14 +65065,17 @@ class TestAccessControlConstraintsSuite : public TestCommand case 6: { LogStep(6, "Constraint error: target has both endpoint and device type (TC-ACL-2.4 step 42)"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNonNull(); { @@ -64973,8 +65087,10 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNonNull(); @@ -64994,7 +65110,7 @@ class TestAccessControlConstraintsSuite : public TestCommand } listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -65003,14 +65119,17 @@ class TestAccessControlConstraintsSuite : public TestCommand case 7: { LogStep(7, "Constraint error: Invalid privilege value step 32)"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNonNull(); { @@ -65022,13 +65141,15 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(6); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(6); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -65037,14 +65158,17 @@ class TestAccessControlConstraintsSuite : public TestCommand case 8: { LogStep(8, "Constraint error: invalid subject 0xFFFF_FFFF_FFFF_FFFF (TC-ACL-2.4 step 35)"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNonNull(); { @@ -65056,8 +65180,10 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNonNull(); { @@ -65069,7 +65195,7 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -65078,14 +65204,17 @@ class TestAccessControlConstraintsSuite : public TestCommand case 9: { LogStep(9, "Constraint error: invalid subject 0xFFFF_FFFD_0000_0000 (TC-ACL-2.4 step 36)"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNonNull(); { @@ -65097,8 +65226,10 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNonNull(); { @@ -65110,7 +65241,7 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -65119,14 +65250,17 @@ class TestAccessControlConstraintsSuite : public TestCommand case 10: { LogStep(10, "Constraint error: invalid subject 0xFFFF_FFFF_FFFF_0000 (TC-ACL-2.4 step 37)"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNonNull(); { @@ -65138,8 +65272,10 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); listHolder_0->mList[1].subjects.SetNonNull(); { @@ -65151,7 +65287,7 @@ class TestAccessControlConstraintsSuite : public TestCommand listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -77206,7 +77342,7 @@ class TestGroupMessagingSuite : public TestCommand chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; case 5: @@ -77215,7 +77351,7 @@ class TestGroupMessagingSuite : public TestCommand chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; case 6: @@ -77314,7 +77450,7 @@ class TestGroupMessagingSuite : public TestCommand chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; case 27: @@ -77323,7 +77459,7 @@ class TestGroupMessagingSuite : public TestCommand chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; case 28: @@ -77512,7 +77648,7 @@ class TestGroupMessagingSuite : public TestCommand LogStep(4, "Add Group 1 (endpoint 1)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional @@ -77522,7 +77658,7 @@ class TestGroupMessagingSuite : public TestCommand LogStep(5, "Add Group 2 (endpoint 0)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 258U; + value.groupID = 258U; value.groupName = chip::Span("Group #2garbage: not in length on purpose", 8); return SendCommand(kIdentityAlpha, GetEndpoint(0), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional @@ -77531,25 +77667,30 @@ class TestGroupMessagingSuite : public TestCommand case 6: { LogStep(6, "Install ACLs"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - listHolder_0->mList[1].privilege = static_cast(4); - listHolder_0->mList[1].authMode = static_cast(3); + listHolder_0->mList[1].privilege = + static_cast(4); + listHolder_0->mList[1].authMode = + static_cast(3); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -77632,19 +77773,22 @@ class TestGroupMessagingSuite : public TestCommand case 19: { LogStep(19, "Cleanup ACLs"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -77773,7 +77917,7 @@ class TestGroupMessagingSuite : public TestCommand LogStep(26, "Add Group 1 (endpoint 1) for gamma"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); return SendCommand(kIdentityGamma, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional @@ -77783,7 +77927,7 @@ class TestGroupMessagingSuite : public TestCommand LogStep(27, "Add Group 2 (endpoint 0) for gamma"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 258U; + value.groupID = 258U; value.groupName = chip::Span("Group #2garbage: not in length on purpose", 8); return SendCommand(kIdentityGamma, GetEndpoint(0), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional @@ -77792,25 +77936,30 @@ class TestGroupMessagingSuite : public TestCommand case 28: { LogStep(28, "Install ACLs for gamma"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - listHolder_0->mList[1].privilege = static_cast(4); - listHolder_0->mList[1].authMode = static_cast(3); + listHolder_0->mList[1].privilege = + static_cast(4); + listHolder_0->mList[1].authMode = + static_cast(3); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityGamma, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -77885,19 +78034,22 @@ class TestGroupMessagingSuite : public TestCommand case 40: { LogStep(40, "Cleanup ACLs for gamma"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = + new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 0U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 1); } return WriteAttribute(kIdentityGamma, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -77954,7 +78106,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 135U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 0U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 0U)); } break; case 2: @@ -77963,7 +78115,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; case 3: @@ -77972,7 +78124,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 126U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; case 4: @@ -77987,7 +78139,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; case 7: @@ -77996,7 +78148,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Group #1", 8))); } break; @@ -78006,7 +78158,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; case 9: @@ -78029,7 +78181,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; case 11: @@ -78038,7 +78190,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Group #2", 8))); } break; @@ -78048,7 +78200,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 32767U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 32767U)); } break; case 13: @@ -78057,7 +78209,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Group #1", 8))); } break; @@ -78067,7 +78219,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Group #2", 8))); } break; @@ -78091,7 +78243,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 135U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 0U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 0U)); } break; case 17: @@ -78100,7 +78252,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 260U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 260U)); } break; case 18: @@ -78109,7 +78261,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; case 19: @@ -78118,7 +78270,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Group #1", 8))); } break; @@ -78128,7 +78280,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; case 21: @@ -78154,7 +78306,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; case 24: @@ -78163,7 +78315,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; case 25: @@ -78172,7 +78324,7 @@ class TestGroupsClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 32767U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 32767U)); } break; case 26: @@ -78213,7 +78365,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(1, "View Group 0 (invalid)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 0U; + value.groupID = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78223,7 +78375,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(2, "View First Group (not found)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78233,7 +78385,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(3, "Add First Group (no keys)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional @@ -78301,7 +78453,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(6, "Add First Group (new)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional @@ -78311,7 +78463,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(7, "View First Group (new)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78321,7 +78473,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(8, "View Second Group (not found)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 258U; + value.groupID = 258U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78342,7 +78494,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(10, "Add Second Group (new)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 258U; + value.groupID = 258U; value.groupName = chip::Span("Group #2garbage: not in length on purpose", 8); return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional @@ -78352,7 +78504,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(11, "View Second Group (new)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 258U; + value.groupID = 258U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78362,7 +78514,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(12, "View Group 3 (not found)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 32767U; + value.groupID = 32767U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78372,7 +78524,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(13, "View First Group (existing)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78382,7 +78534,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(14, "View Second Group (existing)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 258U; + value.groupID = 258U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78410,7 +78562,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(16, "Remove Group 0 (invalid)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; - value.groupId = 0U; + value.groupID = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveGroup::Id, value, chip::NullOptional @@ -78420,7 +78572,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(17, "Remove Group 4 (not found)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; - value.groupId = 260U; + value.groupID = 260U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveGroup::Id, value, chip::NullOptional @@ -78430,7 +78582,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(18, "Remove Second Group (existing)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; - value.groupId = 258U; + value.groupID = 258U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveGroup::Id, value, chip::NullOptional @@ -78440,7 +78592,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(19, "View First Group (not removed)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78450,7 +78602,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(20, "View Second Group (removed)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 258U; + value.groupID = 258U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78488,7 +78640,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(23, "View First Group (removed)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78498,7 +78650,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(24, "View Second Group (still removed)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 258U; + value.groupID = 258U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78508,7 +78660,7 @@ class TestGroupsClusterSuite : public TestCommand LogStep(25, "View Group 3 (removed)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupId = 32767U; + value.groupID = 32767U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, chip::NullOptional @@ -78663,7 +78815,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; case 11: @@ -78672,7 +78824,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; case 12: @@ -78733,7 +78885,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; case 17: @@ -78975,7 +79127,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand LogStep(10, "Add Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional @@ -78985,7 +79137,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand LogStep(11, "Add Group 2"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 258U; + value.groupID = 258U; value.groupName = chip::Span("Group #2garbage: not in length on purpose", 8); return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional @@ -79030,7 +79182,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand LogStep(16, "Remove Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveGroup::Id, value, chip::NullOptional @@ -81611,7 +81763,7 @@ class TestGroupDemoConfigSuite : public TestCommand chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; case 4: @@ -81697,7 +81849,7 @@ class TestGroupDemoConfigSuite : public TestCommand LogStep(3, "Add Group 1 (endpoint 1)"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 257U; + value.groupID = 257U; value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional @@ -81706,20 +81858,25 @@ class TestGroupDemoConfigSuite : public TestCommand case 4: { LogStep(4, "Install ACLs"); ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(2); + auto * listHolder_0 = + new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); listHolder_0->mList[0].fabricIndex = 1U; - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(3); + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(3); listHolder_0->mList[1].subjects.SetNonNull(); { @@ -81731,7 +81888,7 @@ class TestGroupDemoConfigSuite : public TestCommand listHolder_0->mList[1].targets.SetNull(); listHolder_0->mList[1].fabricIndex = 1U; - value = chip::app::DataModel::List( + value = chip::app::DataModel::List( listHolder_0->mList, 2); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, @@ -102274,8 +102431,8 @@ class Test_TC_OO_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; - value.effectId = static_cast(0); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(0); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, chip::NullOptional @@ -102332,8 +102489,8 @@ class Test_TC_OO_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; - value.effectId = static_cast(0); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(0); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, chip::NullOptional @@ -102389,8 +102546,8 @@ class Test_TC_OO_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; - value.effectId = static_cast(1); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(1); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, chip::NullOptional @@ -102613,8 +102770,8 @@ class Test_TC_OO_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; - value.effectId = static_cast(0); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(0); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, chip::NullOptional diff --git a/zzz_generated/contact-sensor-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/contact-sensor-app/zap-generated/IMClusterCommandHandler.cpp index c7d1360efc3716..b00caa4216d19f 100644 --- a/zzz_generated/contact-sensor-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/contact-sensor-app/zap-generated/IMClusterCommandHandler.cpp @@ -551,13 +551,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/contact-sensor-app/zap-generated/endpoint_config.h b/zzz_generated/contact-sensor-app/zap-generated/endpoint_config.h index 419bb7512cb90f..ca9bcd81f14275 100644 --- a/zzz_generated/contact-sensor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/contact-sensor-app/zap-generated/endpoint_config.h @@ -168,7 +168,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -512,7 +512,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index 93ba75c639084c..af6596c690186a 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -98,11 +98,12 @@ typedef void (*BindingAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAclListAttributeCallback)( void * context, - const chip::app::DataModel::DecodableList & - data); + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & data); typedef void (*AccessControlExtensionListAttributeCallback)( void * context, - const chip::app::DataModel::DecodableList & data); + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & data); typedef void (*AccessControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAcceptedCommandListListAttributeCallback)( @@ -129,7 +130,7 @@ typedef void (*BasicInformationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OtaSoftwareUpdateProviderAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallback)( +typedef void (*OtaSoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & data); 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 934293738377f9..7bb0ef4746c056 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -748,7 +748,7 @@ class GroupsAddGroup : public ClusterCommand { GroupsAddGroup() : ClusterCommand("add-group") { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); AddArgument("GroupName", &mRequest.groupName); ClusterCommand::AddArguments(); } @@ -762,7 +762,7 @@ class GroupsAddGroup : public ClusterCommand { __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupId = [NSNumber numberWithUnsignedShort:mRequest.groupId]; + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; params.groupName = [[NSString alloc] initWithBytes:mRequest.groupName.data() length:mRequest.groupName.size() encoding:NSUTF8StringEncoding]; @@ -797,7 +797,7 @@ class GroupsViewGroup : public ClusterCommand { GroupsViewGroup() : ClusterCommand("view-group") { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); ClusterCommand::AddArguments(); } @@ -810,7 +810,7 @@ class GroupsViewGroup : public ClusterCommand { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupId = [NSNumber numberWithUnsignedShort:mRequest.groupId]; + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -898,7 +898,7 @@ class GroupsRemoveGroup : public ClusterCommand { GroupsRemoveGroup() : ClusterCommand("remove-group") { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); ClusterCommand::AddArguments(); } @@ -911,7 +911,7 @@ class GroupsRemoveGroup : public ClusterCommand { __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupId = [NSNumber numberWithUnsignedShort:mRequest.groupId]; + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -985,7 +985,7 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand { GroupsAddGroupIfIdentifying() : ClusterCommand("add-group-if-identifying") { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); AddArgument("GroupName", &mRequest.groupName); ClusterCommand::AddArguments(); } @@ -999,7 +999,7 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand { __auto_type * params = [[MTRGroupsClusterAddGroupIfIdentifyingParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupId = [NSNumber numberWithUnsignedShort:mRequest.groupId]; + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; params.groupName = [[NSString alloc] initWithBytes:mRequest.groupName.data() length:mRequest.groupName.size() encoding:NSUTF8StringEncoding]; @@ -2908,7 +2908,7 @@ class OnOffOffWithEffect : public ClusterCommand { OnOffOffWithEffect() : ClusterCommand("off-with-effect") { - AddArgument("EffectId", 0, UINT8_MAX, &mRequest.effectId); + AddArgument("EffectIdentifier", 0, UINT8_MAX, &mRequest.effectIdentifier); AddArgument("EffectVariant", 0, UINT8_MAX, &mRequest.effectVariant); ClusterCommand::AddArguments(); } @@ -2922,7 +2922,7 @@ class OnOffOffWithEffect : public ClusterCommand { __auto_type * params = [[MTROnOffClusterOffWithEffectParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.effectId = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.effectId)]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.effectIdentifier)]; params.effectVariant = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.effectVariant)]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -8958,8 +8958,8 @@ class WriteAccessControlAcl : public WriteAttribute { { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; for (auto & entry_0 : mValue) { - MTRAccessControlClusterAccessControlEntry * newElement_0; - newElement_0 = [MTRAccessControlClusterAccessControlEntry new]; + MTRAccessControlClusterAccessControlEntryStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlEntryStruct new]; newElement_0.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.privilege)]; newElement_0.authMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.authMode)]; if (entry_0.subjects.IsNull()) { @@ -9021,8 +9021,9 @@ class WriteAccessControlAcl : public WriteAttribute { } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> + chip::app::DataModel::List mValue; + TypedComplexArgument< + chip::app::DataModel::List> mComplex; }; @@ -9129,8 +9130,8 @@ class WriteAccessControlExtension : public WriteAttribute { { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; for (auto & entry_0 : mValue) { - MTRAccessControlClusterExtensionEntry * newElement_0; - newElement_0 = [MTRAccessControlClusterExtensionEntry new]; + MTRAccessControlClusterAccessControlExtensionStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlExtensionStruct new]; newElement_0.data = [NSData dataWithBytes:entry_0.data.data() length:entry_0.data.size()]; newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; @@ -9150,8 +9151,9 @@ class WriteAccessControlExtension : public WriteAttribute { } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> + chip::app::DataModel::List mValue; + TypedComplexArgument< + chip::app::DataModel::List> mComplex; }; @@ -12866,8 +12868,8 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { : ClusterCommand("query-image") , mComplex_ProtocolsSupported(&mRequest.protocolsSupported) { - AddArgument("VendorId", 0, UINT16_MAX, &mRequest.vendorId); - AddArgument("ProductId", 0, UINT16_MAX, &mRequest.productId); + AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); + AddArgument("ProductID", 0, UINT16_MAX, &mRequest.productID); AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); AddArgument("ProtocolsSupported", &mComplex_ProtocolsSupported); AddArgument("HardwareVersion", 0, UINT16_MAX, &mRequest.hardwareVersion); @@ -12888,8 +12890,8 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { __auto_type * params = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.vendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorId)]; - params.productId = [NSNumber numberWithUnsignedShort:mRequest.productId]; + params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; + params.productID = [NSNumber numberWithUnsignedShort:mRequest.productID]; params.softwareVersion = [NSNumber numberWithUnsignedInt:mRequest.softwareVersion]; { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; @@ -13401,10 +13403,10 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr | Cluster OtaSoftwareUpdateRequestor | 0x002A | |------------------------------------------------------------------------------| | Commands: | | -| * AnnounceOtaProvider | 0x00 | +| * AnnounceOTAProvider | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * DefaultOtaProviders | 0x0000 | +| * DefaultOTAProviders | 0x0000 | | * UpdatePossible | 0x0001 | | * UpdateState | 0x0002 | | * UpdateStateProgress | 0x0003 | @@ -13421,15 +13423,15 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr \*----------------------------------------------------------------------------*/ /* - * Command AnnounceOtaProvider + * Command AnnounceOTAProvider */ -class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ClusterCommand { +class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand { public: - OtaSoftwareUpdateRequestorAnnounceOtaProvider() - : ClusterCommand("announce-ota-provider") + OtaSoftwareUpdateRequestorAnnounceOTAProvider() + : ClusterCommand("announce-otaprovider") { - AddArgument("ProviderNodeId", 0, UINT64_MAX, &mRequest.providerNodeId); - AddArgument("VendorId", 0, UINT16_MAX, &mRequest.vendorId); + AddArgument("ProviderNodeID", 0, UINT64_MAX, &mRequest.providerNodeID); + AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); AddArgument("AnnouncementReason", 0, UINT8_MAX, &mRequest.announcementReason); AddArgument("MetadataForNode", &mRequest.metadataForNode); AddArgument("Endpoint", 0, UINT16_MAX, &mRequest.endpoint); @@ -13444,11 +13446,11 @@ class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; + __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.providerNodeId = [NSNumber numberWithUnsignedLongLong:mRequest.providerNodeId]; - params.vendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorId)]; + params.providerNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.providerNodeID]; + params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; params.announcementReason = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.announcementReason)]; if (mRequest.metadataForNode.HasValue()) { params.metadataForNode = [NSData dataWithBytes:mRequest.metadataForNode.Value().data() @@ -13460,7 +13462,7 @@ class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster announceOtaProviderWithParams:params + [cluster announceOTAProviderWithParams:params completion:^(NSError * _Nullable error) { responsesNeeded--; if (error != nil) { @@ -13476,20 +13478,20 @@ class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ClusterCommand { } private: - chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type mRequest; + chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type mRequest; }; /* - * Attribute DefaultOtaProviders + * Attribute DefaultOTAProviders */ -class ReadOtaSoftwareUpdateRequestorDefaultOtaProviders : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorDefaultOTAProviders : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorDefaultOtaProviders() - : ReadAttribute("default-ota-providers") + ReadOtaSoftwareUpdateRequestorDefaultOTAProviders() + : ReadAttribute("default-otaproviders") { } - ~ReadOtaSoftwareUpdateRequestorDefaultOtaProviders() {} + ~ReadOtaSoftwareUpdateRequestorDefaultOTAProviders() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { @@ -13504,12 +13506,12 @@ class ReadOtaSoftwareUpdateRequestorDefaultOtaProviders : public ReadAttribute { params.filterByFabric = mFabricFiltered.Value(); } [cluster - readAttributeDefaultOtaProvidersWithParams:params + readAttributeDefaultOTAProvidersWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.DefaultOtaProviders response %@", + NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor DefaultOtaProviders read Error", error); + LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders read Error", error); } SetCommandExitStatus(error); }]; @@ -13517,18 +13519,18 @@ class ReadOtaSoftwareUpdateRequestorDefaultOtaProviders : public ReadAttribute { } }; -class WriteOtaSoftwareUpdateRequestorDefaultOtaProviders : public WriteAttribute { +class WriteOtaSoftwareUpdateRequestorDefaultOTAProviders : public WriteAttribute { public: - WriteOtaSoftwareUpdateRequestorDefaultOtaProviders() - : WriteAttribute("default-ota-providers") + WriteOtaSoftwareUpdateRequestorDefaultOTAProviders() + : WriteAttribute("default-otaproviders") , mComplex(&mValue) { - AddArgument("attr-name", "default-ota-providers"); + AddArgument("attr-name", "default-otaproviders"); AddArgument("attr-value", &mComplex); WriteAttribute::AddArguments(); } - ~WriteOtaSoftwareUpdateRequestorDefaultOtaProviders() {} + ~WriteOtaSoftwareUpdateRequestorDefaultOTAProviders() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { @@ -13556,11 +13558,11 @@ class WriteOtaSoftwareUpdateRequestorDefaultOtaProviders : public WriteAttribute } [cluster - writeAttributeDefaultOtaProvidersWithValue:value + writeAttributeDefaultOTAProvidersWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor DefaultOtaProviders write Error", error); + LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders write Error", error); } SetCommandExitStatus(error); }]; @@ -13574,14 +13576,14 @@ class WriteOtaSoftwareUpdateRequestorDefaultOtaProviders : public WriteAttribute mComplex; }; -class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOtaProviders : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOtaProviders() - : SubscribeAttribute("default-ota-providers") + SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders() + : SubscribeAttribute("default-otaproviders") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOtaProviders() {} + ~SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { @@ -13600,12 +13602,12 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOtaProviders : public S if (mAutoResubscribe.HasValue()) { params.resubscribeIfLost = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultOtaProvidersWithParams:params + [cluster subscribeAttributeDefaultOTAProvidersWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.DefaultOtaProviders response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); SetCommandExitStatus(error); }]; @@ -97982,13 +97984,13 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands) commands_list clusterCommands = { make_unique(Id), // - make_unique(), // + make_unique(), // make_unique(Id), // - make_unique(), // + make_unique(), // make_unique(Id), // - make_unique(), // + make_unique(), // make_unique(Id), // - make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // 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 11e60b3dbedc0a..6e5987315647ea 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -503,10 +503,10 @@ class TestAccessControlCluster : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [[MTRAccessControlClusterTarget alloc] init]; @@ -524,20 +524,20 @@ class TestAccessControlCluster : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[2]).endpoint = [NSNumber numberWithUnsignedShort:3U]; ((MTRAccessControlClusterTarget *) temp_3[2]).deviceType = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:4ULL]; temp_3[1] = [NSNumber numberWithUnsignedLongLong:5ULL]; temp_3[2] = [NSNumber numberWithUnsignedLongLong:6ULL]; temp_3[3] = [NSNumber numberWithUnsignedLongLong:7ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; @@ -556,20 +556,20 @@ class TestAccessControlCluster : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[2]).endpoint = [NSNumber numberWithUnsignedShort:11U]; ((MTRAccessControlClusterTarget *) temp_3[2]).deviceType = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - temp_0[2] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[2]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[2]).authMode = [NSNumber numberWithUnsignedChar:3U]; + temp_0[2] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[2]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[2]).authMode = [NSNumber numberWithUnsignedChar:3U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:12ULL]; temp_3[1] = [NSNumber numberWithUnsignedLongLong:13ULL]; temp_3[2] = [NSNumber numberWithUnsignedLongLong:14ULL]; temp_3[3] = [NSNumber numberWithUnsignedLongLong:15ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[2]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[2]).subjects = temp_3; } { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; @@ -588,9 +588,9 @@ class TestAccessControlCluster : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[2]).endpoint = [NSNumber numberWithUnsignedShort:19U]; ((MTRAccessControlClusterTarget *) temp_3[2]).deviceType = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[2]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[2]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -615,287 +615,288 @@ class TestAccessControlCluster : public TestCommandBridge { __auto_type * params = [[MTRReadParams alloc] init]; params.filterByFabric = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + [cluster + readAttributeACLWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[0]) - .endpoint, - 0U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[1]) - .cluster, - 1UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[2]) - .cluster, - 2UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[2]) - .endpoint, - 3U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); - VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); - VerifyOrReturn(CheckValueNonNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); - VerifyOrReturn(CheckValue("Subjects", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects count], - static_cast(4))); - VerifyOrReturn(CheckValue( - "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[0], 4ULL)); - VerifyOrReturn(CheckValue( - "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[1], 5ULL)); - VerifyOrReturn(CheckValue( - "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[2], 6ULL)); - VerifyOrReturn(CheckValue( - "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[3], 7ULL)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[0]) - .endpoint, - 8U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[1]) - .cluster, - 9UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[2]) - .cluster, - 10UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[2]) - .endpoint, - 11U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).privilege, 3U)); - VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).authMode, 3U)); - VerifyOrReturn(CheckValueNonNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects)); - VerifyOrReturn(CheckValue("Subjects", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects count], - static_cast(4))); - VerifyOrReturn(CheckValue("", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[0], 12ULL)); - VerifyOrReturn(CheckValue("", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[1], 13ULL)); - VerifyOrReturn(CheckValue("", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[2], 14ULL)); - VerifyOrReturn(CheckValue("", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[3], 15ULL)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[0]) - .endpoint, - 16U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[1]) - .cluster, - 17UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[2]) - .cluster, - 18UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[2]) - .endpoint, - 19U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[0]) + .endpoint, + 0U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[1]) + .cluster, + 1UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[2]) + .cluster, + 2UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[2]) + .endpoint, + 3U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).privilege, 1U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).authMode, 2U)); + VerifyOrReturn(CheckValueNonNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects)); + VerifyOrReturn(CheckValue("Subjects", + [((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects count], + static_cast(4))); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects[0], 4ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects[1], 5ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects[2], 6ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects[3], 7ULL)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[0]) + .endpoint, + 8U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[1]) + .cluster, + 9UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[2]) + .cluster, + 10UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[2]) + .endpoint, + 11U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).privilege, 3U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).authMode, 3U)); + VerifyOrReturn(CheckValueNonNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects)); + VerifyOrReturn(CheckValue("Subjects", + [((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects count], + static_cast(4))); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects[0], 12ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects[1], 13ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects[2], 14ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects[3], 15ULL)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[0]) + .endpoint, + 16U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[1]) + .cluster, + 17UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[2]) + .cluster, + 18UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[2]) + .endpoint, + 19U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -910,25 +911,25 @@ class TestAccessControlCluster : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -963,25 +964,25 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(2))); VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull("Subjects", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull("Targets", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).fabricIndex, 1U)); VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).privilege, 1U)); VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).authMode, 2U)); + VerifyOrReturn(CheckValueNull("Subjects", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects)); + VerifyOrReturn(CheckValueNull("Targets", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).fabricIndex, 1U)); } NextTest(); @@ -1000,19 +1001,19 @@ class TestAccessControlCluster : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1050,15 +1051,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull("Subjects", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull("Targets", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1077,19 +1078,19 @@ class TestAccessControlCluster : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:1U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1127,15 +1128,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull("Subjects", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull("Targets", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1154,23 +1155,23 @@ class TestAccessControlCluster : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:0ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1208,15 +1209,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull("Subjects", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull("Targets", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1235,17 +1236,17 @@ class TestAccessControlCluster : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [[MTRAccessControlClusterTarget alloc] init]; @@ -1253,9 +1254,9 @@ class TestAccessControlCluster : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[0]).endpoint = nil; ((MTRAccessControlClusterTarget *) temp_3[0]).deviceType = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1293,15 +1294,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull("Subjects", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull("Targets", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1320,16 +1321,16 @@ class TestAccessControlCluster : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:1ULL]; @@ -1352,10 +1353,10 @@ class TestAccessControlCluster : public TestCommandBridge { temp_3[17] = [NSNumber numberWithUnsignedLongLong:18ULL]; temp_3[18] = [NSNumber numberWithUnsignedLongLong:19ULL]; temp_3[19] = [NSNumber numberWithUnsignedLongLong:20ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1393,15 +1394,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull("Subjects", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull("Targets", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1420,17 +1421,17 @@ class TestAccessControlCluster : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [[MTRAccessControlClusterTarget alloc] init]; @@ -1533,9 +1534,9 @@ class TestAccessControlCluster : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[19]).endpoint = [NSNumber numberWithUnsignedShort:20U]; ((MTRAccessControlClusterTarget *) temp_3[19]).deviceType = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1573,15 +1574,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull("Subjects", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull("Targets", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1600,10 +1601,10 @@ class TestAccessControlCluster : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [[MTRAccessControlClusterTarget alloc] init]; @@ -1621,20 +1622,20 @@ class TestAccessControlCluster : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[2]).endpoint = [NSNumber numberWithUnsignedShort:3U]; ((MTRAccessControlClusterTarget *) temp_3[2]).deviceType = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:4ULL]; temp_3[1] = [NSNumber numberWithUnsignedLongLong:5ULL]; temp_3[2] = [NSNumber numberWithUnsignedLongLong:6ULL]; temp_3[3] = [NSNumber numberWithUnsignedLongLong:7ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; @@ -1653,20 +1654,20 @@ class TestAccessControlCluster : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[2]).endpoint = [NSNumber numberWithUnsignedShort:11U]; ((MTRAccessControlClusterTarget *) temp_3[2]).deviceType = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - temp_0[2] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[2]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[2]).authMode = [NSNumber numberWithUnsignedChar:3U]; + temp_0[2] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[2]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[2]).authMode = [NSNumber numberWithUnsignedChar:3U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:12ULL]; temp_3[1] = [NSNumber numberWithUnsignedLongLong:13ULL]; temp_3[2] = [NSNumber numberWithUnsignedLongLong:14ULL]; temp_3[3] = [NSNumber numberWithUnsignedLongLong:15ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[2]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[2]).subjects = temp_3; } { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; @@ -1685,20 +1686,20 @@ class TestAccessControlCluster : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[2]).endpoint = [NSNumber numberWithUnsignedShort:19U]; ((MTRAccessControlClusterTarget *) temp_3[2]).deviceType = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[2]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[2]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; - temp_0[3] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[3]).privilege = [NSNumber numberWithUnsignedChar:1U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[3]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[3] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[3]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[3]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:20ULL]; temp_3[1] = [NSNumber numberWithUnsignedLongLong:21ULL]; temp_3[2] = [NSNumber numberWithUnsignedLongLong:22ULL]; temp_3[3] = [NSNumber numberWithUnsignedLongLong:23ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[3]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[3]).subjects = temp_3; } { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; @@ -1717,9 +1718,9 @@ class TestAccessControlCluster : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[2]).endpoint = [NSNumber numberWithUnsignedShort:27U]; ((MTRAccessControlClusterTarget *) temp_3[2]).deviceType = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[3]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[3]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1747,287 +1748,288 @@ class TestAccessControlCluster : public TestCommandBridge { __auto_type * params = [[MTRReadParams alloc] init]; params.filterByFabric = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + [cluster + readAttributeACLWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[0]) - .endpoint, - 0U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[1]) - .cluster, - 1UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[2]) - .cluster, - 2UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[2]) - .endpoint, - 3U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[0]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); - VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); - VerifyOrReturn(CheckValueNonNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); - VerifyOrReturn(CheckValue("Subjects", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects count], - static_cast(4))); - VerifyOrReturn(CheckValue( - "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[0], 4ULL)); - VerifyOrReturn(CheckValue( - "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[1], 5ULL)); - VerifyOrReturn(CheckValue( - "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[2], 6ULL)); - VerifyOrReturn(CheckValue( - "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[3], 7ULL)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[0]) - .endpoint, - 8U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[1]) - .cluster, - 9UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[2]) - .cluster, - 10UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[2]) - .endpoint, - 11U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[1]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).privilege, 3U)); - VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).authMode, 3U)); - VerifyOrReturn(CheckValueNonNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects)); - VerifyOrReturn(CheckValue("Subjects", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects count], - static_cast(4))); - VerifyOrReturn(CheckValue("", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[0], 12ULL)); - VerifyOrReturn(CheckValue("", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[1], 13ULL)); - VerifyOrReturn(CheckValue("", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[2], 14ULL)); - VerifyOrReturn(CheckValue("", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[3], 15ULL)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[0]) - .endpoint, - 16U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[1]) - .cluster, - 17UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[2]) - .cluster, - 18UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[2]) - .endpoint, - 19U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) - actualValue[2]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[0]) + .endpoint, + 0U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[1]) + .cluster, + 1UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[2]) + .cluster, + 2UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[2]) + .endpoint, + 3U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[0]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).privilege, 1U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).authMode, 2U)); + VerifyOrReturn(CheckValueNonNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects)); + VerifyOrReturn(CheckValue("Subjects", + [((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects count], + static_cast(4))); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects[0], 4ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects[1], 5ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects[2], 6ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).subjects[3], 7ULL)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[0]) + .endpoint, + 8U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[1]) + .cluster, + 9UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[2]) + .cluster, + 10UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[2]) + .endpoint, + 11U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[1]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[1]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).privilege, 3U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).authMode, 3U)); + VerifyOrReturn(CheckValueNonNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects)); + VerifyOrReturn(CheckValue("Subjects", + [((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects count], + static_cast(4))); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects[0], 12ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects[1], 13ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects[2], 14ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).subjects[3], 15ULL)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[0]) + .endpoint, + 16U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[1]) + .cluster, + 17UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[2]) + .cluster, + 18UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[2]) + .endpoint, + 19U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntryStruct *) + actualValue[2]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[2]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -2042,12 +2044,12 @@ class TestAccessControlCluster : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -2082,15 +2084,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue("Privilege", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue("AuthMode", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull("Subjects", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull("Targets", + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + ((MTRAccessControlClusterAccessControlEntryStruct *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -3174,11 +3176,11 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id extensionArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).data = mDOkEmpty.HasValue() + temp_0[0] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).data = mDOkEmpty.HasValue() ? [NSData dataWithBytes:mDOkEmpty.Value().data() length:mDOkEmpty.Value().size()] : [[NSData alloc] initWithBytes:"\x17\x18" length:2]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; extensionArgument = temp_0; } @@ -3217,14 +3219,14 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("Extension", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValueAsString( - "Data", ((MTRAccessControlClusterExtensionEntry *) actualValue[0]).data, + "Data", ((MTRAccessControlClusterAccessControlExtensionStruct *) actualValue[0]).data, mDOkEmpty.HasValue() ? [NSData dataWithBytes:mDOkEmpty.Value().data() length:mDOkEmpty.Value().size()] : [[NSData alloc] initWithBytes:"\x17\x18" length:2] )); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterExtensionEntry *) actualValue[0]).fabricIndex, + ((MTRAccessControlClusterAccessControlExtensionStruct *) actualValue[0]).fabricIndex, CurrentFabricIndex)); } @@ -3245,15 +3247,15 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id extensionArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).data = mDOkSingle.HasValue() + temp_0[0] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).data = mDOkSingle.HasValue() ? [NSData dataWithBytes:mDOkSingle.Value().data() length:mDOkSingle.Value().size()] : [[NSData alloc] initWithBytes:"\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68" "\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C" "\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18" length:71]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; extensionArgument = temp_0; } @@ -3295,7 +3297,7 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("Extension", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValueAsString( - "Data", ((MTRAccessControlClusterExtensionEntry *) actualValue[0]).data, + "Data", ((MTRAccessControlClusterAccessControlExtensionStruct *) actualValue[0]).data, mDOkSingle.HasValue() ? [NSData dataWithBytes:mDOkSingle.Value().data() length:mDOkSingle.Value().size()] @@ -3309,7 +3311,7 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { )); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterExtensionEntry *) actualValue[0]).fabricIndex, + ((MTRAccessControlClusterAccessControlExtensionStruct *) actualValue[0]).fabricIndex, CurrentFabricIndex)); } @@ -3330,8 +3332,8 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id extensionArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).data = mDOkFull.HasValue() + temp_0[0] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).data = mDOkFull.HasValue() ? [NSData dataWithBytes:mDOkFull.Value().data() length:mDOkFull.Value().size()] : [[NSData alloc] initWithBytes: @@ -3341,7 +3343,7 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { "\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E" "\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x61\x67\x61\x69\x6E\x2E\x2E\x2E\x2E\x2E\x00\x18" length:128]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; extensionArgument = temp_0; } @@ -3384,7 +3386,7 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("Extension", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValueAsString( - "Data", ((MTRAccessControlClusterExtensionEntry *) actualValue[0]).data, + "Data", ((MTRAccessControlClusterAccessControlExtensionStruct *) actualValue[0]).data, mDOkFull.HasValue() ? [NSData dataWithBytes:mDOkFull.Value().data() length:mDOkFull.Value().size()] : [[NSData alloc] @@ -3401,7 +3403,7 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { )); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterExtensionEntry *) actualValue[0]).fabricIndex, + ((MTRAccessControlClusterAccessControlExtensionStruct *) actualValue[0]).fabricIndex, CurrentFabricIndex)); } @@ -3422,8 +3424,8 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id extensionArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).data = mDBadLength.HasValue() + temp_0[0] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).data = mDBadLength.HasValue() ? [NSData dataWithBytes:mDBadLength.Value().data() length:mDBadLength.Value().size()] : [[NSData alloc] initWithBytes: @@ -3433,7 +3435,7 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { "\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E" "\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x61\x67\x61\x69\x6E\x2E\x2E\x2E\x2E\x2E\x2E\x00\x18" length:129]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; extensionArgument = temp_0; } @@ -3471,11 +3473,11 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id extensionArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).data = mDBadStruct.HasValue() + temp_0[0] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).data = mDBadStruct.HasValue() ? [NSData dataWithBytes:mDBadStruct.Value().data() length:mDBadStruct.Value().size()] : [[NSData alloc] initWithBytes:"\x15\x18" length:2]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; extensionArgument = temp_0; } @@ -3509,15 +3511,15 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id extensionArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).data = mDBadList.HasValue() + temp_0[0] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).data = mDBadList.HasValue() ? [NSData dataWithBytes:mDBadList.Value().data() length:mDBadList.Value().size()] : [[NSData alloc] initWithBytes:"\x37\x01\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54" "\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20" "\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18" length:72]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; extensionArgument = temp_0; } @@ -3553,15 +3555,15 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id extensionArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).data = mDBadElem.HasValue() + temp_0[0] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).data = mDBadElem.HasValue() ? [NSData dataWithBytes:mDBadElem.Value().data() length:mDBadElem.Value().size()] : [[NSData alloc] initWithBytes:"\x17\x10\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20" "\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20" "\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18" length:65]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; extensionArgument = temp_0; } @@ -3597,15 +3599,15 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id extensionArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).data = mDBadOverflow.HasValue() + temp_0[0] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).data = mDBadOverflow.HasValue() ? [NSData dataWithBytes:mDBadOverflow.Value().data() length:mDBadOverflow.Value().size()] : [[NSData alloc] initWithBytes:"\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68" "\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C" "\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18\xFF" length:72]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; extensionArgument = temp_0; } @@ -3641,15 +3643,15 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id extensionArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).data = mDBadUnderflow.HasValue() + temp_0[0] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).data = mDBadUnderflow.HasValue() ? [NSData dataWithBytes:mDBadUnderflow.Value().data() length:mDBadUnderflow.Value().size()] : [[NSData alloc] initWithBytes:"\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68" "\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C" "\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00" length:70]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; extensionArgument = temp_0; } @@ -3685,11 +3687,11 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id extensionArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).data = mDBadNone.HasValue() + temp_0[0] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).data = mDBadNone.HasValue() ? [NSData dataWithBytes:mDBadNone.Value().data() length:mDBadNone.Value().size()] : [[NSData alloc] initWithBytes:"" length:0]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; extensionArgument = temp_0; } @@ -3723,21 +3725,21 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id extensionArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).data = mDOkEmpty.HasValue() + temp_0[0] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).data = mDOkEmpty.HasValue() ? [NSData dataWithBytes:mDOkEmpty.Value().data() length:mDOkEmpty.Value().size()] : [[NSData alloc] initWithBytes:"\x17\x18" length:2]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[0]).fabricIndex = [CurrentFabricIndex copy]; - temp_0[1] = [[MTRAccessControlClusterExtensionEntry alloc] init]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[1]).data = mDOkSingle.HasValue() + temp_0[1] = [[MTRAccessControlClusterAccessControlExtensionStruct alloc] init]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[1]).data = mDOkSingle.HasValue() ? [NSData dataWithBytes:mDOkSingle.Value().data() length:mDOkSingle.Value().size()] : [[NSData alloc] initWithBytes:"\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68" "\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C" "\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18" length:71]; - ((MTRAccessControlClusterExtensionEntry *) temp_0[1]).fabricIndex = [CurrentFabricIndex copy]; + ((MTRAccessControlClusterAccessControlExtensionStruct *) temp_0[1]).fabricIndex = [CurrentFabricIndex copy]; extensionArgument = temp_0; } @@ -3783,14 +3785,14 @@ class Test_TC_ACL_2_3 : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("Extension", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValueAsString( - "Data", ((MTRAccessControlClusterExtensionEntry *) actualValue[0]).data, + "Data", ((MTRAccessControlClusterAccessControlExtensionStruct *) actualValue[0]).data, mDOkEmpty.HasValue() ? [NSData dataWithBytes:mDOkEmpty.Value().data() length:mDOkEmpty.Value().size()] : [[NSData alloc] initWithBytes:"\x17\x18" length:2] )); VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterExtensionEntry *) actualValue[0]).fabricIndex, + ((MTRAccessControlClusterAccessControlExtensionStruct *) actualValue[0]).fabricIndex, CurrentFabricIndex)); } @@ -45182,21 +45184,21 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [[MTRAccessControlClusterTarget alloc] init]; @@ -45204,9 +45206,9 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[0]).endpoint = nil; ((MTRAccessControlClusterTarget *) temp_3[0]).deviceType = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; aclArgument = temp_0; } @@ -45256,14 +45258,14 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; - params.providerNodeId = mProviderNodeId.HasValue() ? [NSNumber numberWithUnsignedLongLong:mProviderNodeId.Value()] + __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; + params.providerNodeID = mProviderNodeId.HasValue() ? [NSNumber numberWithUnsignedLongLong:mProviderNodeId.Value()] : [NSNumber numberWithUnsignedLongLong:12648430ULL]; - params.vendorId = [NSNumber numberWithUnsignedShort:0U]; + params.vendorID = [NSNumber numberWithUnsignedShort:0U]; params.announcementReason = [NSNumber numberWithUnsignedChar:0U]; params.endpoint = mEndpoint.HasValue() ? [NSNumber numberWithUnsignedShort:mEndpoint.Value()] : [NSNumber numberWithUnsignedShort:0U]; - [cluster announceOtaProviderWithParams:params + [cluster announceOTAProviderWithParams:params completion:^(NSError * _Nullable err) { NSLog(@"Send an announce OTA provider command to the requestor Error: %@", err); @@ -95063,8 +95065,9 @@ class TestDescriptorCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("DeviceTypeList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("type", ((MTRDescriptorClusterDeviceTypeStruct *) actualValue[0]).type, 22UL)); - VerifyOrReturn(CheckValue("revision", ((MTRDescriptorClusterDeviceTypeStruct *) actualValue[0]).revision, 1U)); + VerifyOrReturn( + CheckValue("DeviceType", ((MTRDescriptorClusterDeviceTypeStruct *) actualValue[0]).deviceType, 22UL)); + VerifyOrReturn(CheckValue("Revision", ((MTRDescriptorClusterDeviceTypeStruct *) actualValue[0]).revision, 1U)); } NextTest(); @@ -96573,7 +96576,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 3U)); + VerifyOrReturn(CheckValue("ErrorCode", actualValue, 3U)); } NextTest(); @@ -96651,7 +96654,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); + VerifyOrReturn(CheckValue("ErrorCode", actualValue, 4U)); } NextTest(); @@ -96746,7 +96749,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + VerifyOrReturn(CheckValue("ErrorCode", actualValue, 0U)); } NextTest(); @@ -96801,7 +96804,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); + VerifyOrReturn(CheckValue("ErrorCode", actualValue, 4U)); } NextTest(); @@ -96852,7 +96855,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 2U)); + VerifyOrReturn(CheckValue("ErrorCode", actualValue, 2U)); } NextTest(); @@ -96903,7 +96906,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + VerifyOrReturn(CheckValue("ErrorCode", actualValue, 0U)); } NextTest(); @@ -96958,7 +96961,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + VerifyOrReturn(CheckValue("ErrorCode", actualValue, 0U)); } NextTest(); @@ -97013,7 +97016,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + VerifyOrReturn(CheckValue("ErrorCode", actualValue, 0U)); } NextTest(); @@ -100231,7 +100234,7 @@ class TestArmFailSafe : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + VerifyOrReturn(CheckValue("ErrorCode", actualValue, 0U)); } NextTest(); @@ -101340,26 +101343,26 @@ class TestAccessControlConstraints : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:1U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:1U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; aclArgument = temp_0; } @@ -101388,26 +101391,26 @@ class TestAccessControlConstraints : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; aclArgument = temp_0; } @@ -101438,26 +101441,26 @@ class TestAccessControlConstraints : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:4U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:4U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; aclArgument = temp_0; } @@ -101486,27 +101489,27 @@ class TestAccessControlConstraints : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:0ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; aclArgument = temp_0; } @@ -101535,21 +101538,21 @@ class TestAccessControlConstraints : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [[MTRAccessControlClusterTarget alloc] init]; @@ -101557,9 +101560,9 @@ class TestAccessControlConstraints : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[0]).endpoint = nil; ((MTRAccessControlClusterTarget *) temp_3[0]).deviceType = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; aclArgument = temp_0; } @@ -101588,21 +101591,21 @@ class TestAccessControlConstraints : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [[MTRAccessControlClusterTarget alloc] init]; @@ -101610,9 +101613,9 @@ class TestAccessControlConstraints : public TestCommandBridge { ((MTRAccessControlClusterTarget *) temp_3[0]).endpoint = [NSNumber numberWithUnsignedShort:22U]; ((MTRAccessControlClusterTarget *) temp_3[0]).deviceType = [NSNumber numberWithUnsignedInt:33UL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; aclArgument = temp_0; } @@ -101643,23 +101646,23 @@ class TestAccessControlConstraints : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:6U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:6U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; aclArgument = temp_0; } @@ -101688,27 +101691,27 @@ class TestAccessControlConstraints : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; aclArgument = temp_0; } @@ -101739,27 +101742,27 @@ class TestAccessControlConstraints : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:18446744060824649728ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; aclArgument = temp_0; } @@ -101790,27 +101793,27 @@ class TestAccessControlConstraints : public TestCommandBridge { id aclArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:18446744073709486080ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; aclArgument = temp_0; } @@ -126772,7 +126775,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:0U]; + params.groupID = [NSNumber numberWithUnsignedShort:0U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View Group 0 (invalid) Error: %@", err); @@ -126781,12 +126784,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 135U)); + VerifyOrReturn(CheckValue("Status", actualValue, 135U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 0U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 0U)); } NextTest(); @@ -126803,7 +126806,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:257U]; + params.groupID = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View First Group (not found) Error: %@", err); @@ -126812,12 +126815,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); } NextTest(); @@ -126834,7 +126837,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:257U]; + params.groupID = [NSNumber numberWithUnsignedShort:257U]; params.groupName = @"Group #1"; [cluster addGroupWithParams:params completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { @@ -126844,12 +126847,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 126U)); + VerifyOrReturn(CheckValue("Status", actualValue, 126U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); } NextTest(); @@ -126942,7 +126945,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:257U]; + params.groupID = [NSNumber numberWithUnsignedShort:257U]; params.groupName = @"Group #1"; [cluster addGroupWithParams:params completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { @@ -126952,12 +126955,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); } NextTest(); @@ -126974,7 +126977,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:257U]; + params.groupID = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View First Group (new) Error: %@", err); @@ -126983,17 +126986,17 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); } { id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #1")); + VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"Group #1")); } NextTest(); @@ -127010,7 +127013,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:258U]; + params.groupID = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View Second Group (not found) Error: %@", err); @@ -127019,12 +127022,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 258U)); } NextTest(); @@ -127054,12 +127057,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.capacity; - VerifyOrReturn(CheckValueNull("capacity", actualValue)); + VerifyOrReturn(CheckValueNull("Capacity", actualValue)); } { id actualValue = values.groupList; - VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("GroupList", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue("", actualValue[0], 257U)); } @@ -127077,7 +127080,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:258U]; + params.groupID = [NSNumber numberWithUnsignedShort:258U]; params.groupName = @"Group #2"; [cluster addGroupWithParams:params completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { @@ -127087,12 +127090,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 258U)); } NextTest(); @@ -127109,7 +127112,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:258U]; + params.groupID = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View Second Group (new) Error: %@", err); @@ -127118,17 +127121,17 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 258U)); } { id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #2")); + VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"Group #2")); } NextTest(); @@ -127145,7 +127148,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:32767U]; + params.groupID = [NSNumber numberWithUnsignedShort:32767U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View Group 3 (not found) Error: %@", err); @@ -127154,12 +127157,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 32767U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 32767U)); } NextTest(); @@ -127176,7 +127179,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:257U]; + params.groupID = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View First Group (existing) Error: %@", err); @@ -127185,17 +127188,17 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); } { id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #1")); + VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"Group #1")); } NextTest(); @@ -127212,7 +127215,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:258U]; + params.groupID = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View Second Group (existing) Error: %@", err); @@ -127221,17 +127224,17 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 258U)); } { id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #2")); + VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"Group #2")); } NextTest(); @@ -127264,12 +127267,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.capacity; - VerifyOrReturn(CheckValueNull("capacity", actualValue)); + VerifyOrReturn(CheckValueNull("Capacity", actualValue)); } { id actualValue = values.groupList; - VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("GroupList", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue("", actualValue[0], 258U)); } @@ -127287,7 +127290,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:0U]; + params.groupID = [NSNumber numberWithUnsignedShort:0U]; [cluster removeGroupWithParams:params completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Remove Group 0 (invalid) Error: %@", err); @@ -127296,12 +127299,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 135U)); + VerifyOrReturn(CheckValue("Status", actualValue, 135U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 0U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 0U)); } NextTest(); @@ -127318,7 +127321,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:260U]; + params.groupID = [NSNumber numberWithUnsignedShort:260U]; [cluster removeGroupWithParams:params completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Remove Group 4 (not found) Error: %@", err); @@ -127327,12 +127330,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 260U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 260U)); } NextTest(); @@ -127349,7 +127352,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:258U]; + params.groupID = [NSNumber numberWithUnsignedShort:258U]; [cluster removeGroupWithParams:params completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Remove Second Group (existing) Error: %@", err); @@ -127358,12 +127361,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 258U)); } NextTest(); @@ -127380,7 +127383,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:257U]; + params.groupID = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View First Group (not removed) Error: %@", err); @@ -127389,17 +127392,17 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); } { id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #1")); + VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"Group #1")); } NextTest(); @@ -127416,7 +127419,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:258U]; + params.groupID = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View Second Group (removed) Error: %@", err); @@ -127425,12 +127428,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 258U)); } NextTest(); @@ -127464,12 +127467,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.capacity; - VerifyOrReturn(CheckValueNull("capacity", actualValue)); + VerifyOrReturn(CheckValueNull("Capacity", actualValue)); } { id actualValue = values.groupList; - VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("GroupList", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue("", actualValue[0], 257U)); } @@ -127505,7 +127508,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:257U]; + params.groupID = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View First Group (removed) Error: %@", err); @@ -127514,12 +127517,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); } NextTest(); @@ -127536,7 +127539,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:258U]; + params.groupID = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View Second Group (still removed) Error: %@", err); @@ -127545,12 +127548,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 258U)); } NextTest(); @@ -127567,7 +127570,7 @@ class TestGroupsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:32767U]; + params.groupID = [NSNumber numberWithUnsignedShort:32767U]; [cluster viewGroupWithParams:params completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"View Group 3 (removed) Error: %@", err); @@ -127576,12 +127579,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 32767U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 32767U)); } NextTest(); @@ -127616,12 +127619,12 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.capacity; - VerifyOrReturn(CheckValueNull("capacity", actualValue)); + VerifyOrReturn(CheckValueNull("Capacity", actualValue)); } { id actualValue = values.groupList; - VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("GroupList", [actualValue count], static_cast(0))); } NextTest(); @@ -128225,7 +128228,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:257U]; + params.groupID = [NSNumber numberWithUnsignedShort:257U]; params.groupName = @"Group #1"; [cluster addGroupWithParams:params completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { @@ -128235,12 +128238,12 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); } NextTest(); @@ -128257,7 +128260,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:258U]; + params.groupID = [NSNumber numberWithUnsignedShort:258U]; params.groupName = @"Group #2"; [cluster addGroupWithParams:params completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { @@ -128267,12 +128270,12 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 258U)); } NextTest(); @@ -128435,7 +128438,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; - params.groupId = [NSNumber numberWithUnsignedShort:257U]; + params.groupID = [NSNumber numberWithUnsignedShort:257U]; [cluster removeGroupWithParams:params completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Remove Group 1 Error: %@", err); @@ -128444,12 +128447,12 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); } NextTest(); diff --git a/zzz_generated/dynamic-bridge-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/dynamic-bridge-app/zap-generated/CHIPClientCallbacks.h index 70ca3e88c274a6..62553f97b4e8ed 100644 --- a/zzz_generated/dynamic-bridge-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/dynamic-bridge-app/zap-generated/CHIPClientCallbacks.h @@ -41,11 +41,12 @@ typedef void (*BindingAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAclListAttributeCallback)( void * context, - const chip::app::DataModel::DecodableList & - data); + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & data); typedef void (*AccessControlExtensionListAttributeCallback)( void * context, - const chip::app::DataModel::DecodableList & data); + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & data); typedef void (*AccessControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAcceptedCommandListListAttributeCallback)( diff --git a/zzz_generated/light-switch-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/light-switch-app/zap-generated/IMClusterCommandHandler.cpp index c7d1360efc3716..b00caa4216d19f 100644 --- a/zzz_generated/light-switch-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/light-switch-app/zap-generated/IMClusterCommandHandler.cpp @@ -551,13 +551,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h index c3725bb64036f3..e5eeeb83a3fe2a 100644 --- a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h +++ b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h @@ -159,7 +159,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -503,7 +503,7 @@ #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=0) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=2) */ \ diff --git a/zzz_generated/lighting-app/nxp/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/lighting-app/nxp/zap-generated/IMClusterCommandHandler.cpp index ca173e1ae470bc..3bd64a77c04847 100644 --- a/zzz_generated/lighting-app/nxp/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/lighting-app/nxp/zap-generated/IMClusterCommandHandler.cpp @@ -557,13 +557,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/lighting-app/nxp/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/nxp/zap-generated/endpoint_config.h index fb3a75039574a8..860c7b4013f42a 100644 --- a/zzz_generated/lighting-app/nxp/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/nxp/zap-generated/endpoint_config.h @@ -135,7 +135,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -386,7 +386,7 @@ #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=0) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=2) */ \ diff --git a/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp index adf2da73d06244..f0e07a1d5589e5 100644 --- a/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp @@ -851,13 +851,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index a8d2d046f2d30d..b81eb543bcdff7 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -177,7 +177,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -600,7 +600,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=12) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=14) */ \ diff --git a/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp index e885cb4b8bfd10..28e7059c99e302 100644 --- a/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp @@ -650,13 +650,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index b5b15063d4efeb..79e3d6509d3956 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -202,7 +202,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -593,7 +593,7 @@ #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=0) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=2) */ \ diff --git a/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h index 8c19024e86dfdc..88ed15790f0d72 100644 --- a/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h @@ -32,10 +32,11 @@ // List specific responses typedef void (*AccessControlAclListAttributeCallback)( void * context, - const chip::app::DataModel::DecodableList & - data); + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & data); typedef void (*AccessControlExtensionListAttributeCallback)( void * context, - const chip::app::DataModel::DecodableList & data); + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & data); typedef void (*AccessControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp index c5fc939fadb2e4..b1a5bd9c9be868 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp @@ -477,13 +477,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 6adce2687b9e8a..208817a0893f66 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -163,7 +163,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -361,7 +361,7 @@ #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=0) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=2) */ \ diff --git a/zzz_generated/pump-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/pump-app/zap-generated/IMClusterCommandHandler.cpp index 61326d20165fff..d850b5db3d583a 100644 --- a/zzz_generated/pump-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/pump-app/zap-generated/IMClusterCommandHandler.cpp @@ -476,13 +476,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index 4175c8b2a12042..94c9ef3c40ba79 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -151,7 +151,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* UpdateStateProgress */ \ @@ -383,7 +383,7 @@ #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=0) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=2) */ \ diff --git a/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp index b9b666fe3a3bf9..588bc94aae0bb5 100644 --- a/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp @@ -376,13 +376,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index 2614982aeceb09..d392f2efe47f54 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -142,7 +142,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(true) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* UpdateStateProgress */ \ @@ -287,7 +287,7 @@ #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=0) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=2) */ \ diff --git a/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp index 190ff91967d964..190a33dc43fd64 100644 --- a/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp @@ -505,13 +505,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index 628b2fbb615d52..310aefd1aa0c9b 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -192,7 +192,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -579,7 +579,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=2) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=4) */ \ diff --git a/zzz_generated/window-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/window-app/zap-generated/IMClusterCommandHandler.cpp index de38b57f697afc..2a72863844227f 100644 --- a/zzz_generated/window-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/window-app/zap-generated/IMClusterCommandHandler.cpp @@ -477,13 +477,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::AnnounceOtaProvider::Id: { - Commands::AnnounceOtaProvider::DecodableType commandData; + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback(apCommandObj, aCommandPath, commandData); } break; } diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index f968c8d69b4a90..bf6f9654516527 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -166,7 +166,7 @@ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOTAProviders */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ @@ -625,7 +625,7 @@ #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=0) */ \ - 0x00000000 /* AnnounceOtaProvider */, \ + 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* AcceptedCommandList (index=2) */ \