diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig index 325eb4172f198c..fb1f20e0dfbc63 100644 --- a/config/telink/chip-module/Kconfig +++ b/config/telink/chip-module/Kconfig @@ -188,26 +188,6 @@ config SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE int default 255 if SHELL_BACKEND_SERIAL -config CHIP_ICD_SUBSCRIPTION_HANDLING - bool "Enables platform specific handling of ICD subscriptions" - default PM - help - Enables platform specific implementation that handles ICD subscription requests - and selects subscription report interval value considering maximum interval preferred - by the publisher. - -config CHIP_MAX_PREFERRED_SUBSCRIPTION_REPORT_INTERVAL - int "Maximum preferred interval of sending subscription reports (s)" - default 60 - help - Provides maximum preferred interval to be used by a publisher for negotiation - of the final maximum subscription report interval, after receiving a subscription - request from the initiator. This value should be selected as a compromise between - keeping the power consumption low due to not sending reports too often, and allowing - the initiator device to detect the publisher absence reasonably fast due to not sending - the reports too rarely. The current algorithm is to select bigger value from the one - requested by the initiator and the one preferred by the publisher. - config CHIP_ENABLE_POWER_ON_FACTORY_RESET bool "Enable power on factory reset sequence" default n diff --git a/docs/guides/chip_tool_guide.md b/docs/guides/chip_tool_guide.md index ea60f7cfd84a38..32ce669d538a68 100644 --- a/docs/guides/chip_tool_guide.md +++ b/docs/guides/chip_tool_guide.md @@ -489,6 +489,8 @@ Usage: ``` +
+ ### Getting the list of commands supported for a specific cluster To print the list of commands supported by a specific cluster, use the following @@ -539,6 +541,8 @@ Usage: ``` +
+ ### Getting the list of attributes supported for a specific cluster To get the list of attributes for a specific cluster, use the following command @@ -583,6 +587,8 @@ Usage: [1647417857.914110][404444:404444] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/common/Commands.cpp:120: Error 0x0000002F ``` +
+ ### Getting the list of command options To get the list of parameters for a specific command, use the following command @@ -668,6 +674,69 @@ The following flags are available: Here, __ is a `[0/1]` flag, which when set to `1` prints the trace data with automation logs to the console. +
+ +### Commissioner name and ID flags + +All CHIP Tool commands can be used together with the following +commissioner-related flags: + +- `--commissioner-name` +- `--commissioner-nodeid` + +These flags let you control which fabric and node ID are used for the CHIP Tool +when interacting with devices. They are especially useful in scenarios where you +are working with more than one fabric, but you can also use them with a single +CHIP Tool node identity. + +#### `--commissioner-name` flag + +This flag lets you control which fabric is used by selecting a specific fabric +commissioner. + +As per the CHIP Tool implementation, the commissioners are required to have the +following names: `alpha` for the first one, `beta` for the second one, `gamma` +for the third one, `4` for the fourth one, `5` for the fifth one, and so on. + +If you don't use this flag, the CHIP Tool assumes that the command is meant for +the `alpha` commissioner and hence for the fabric associated with this +commissioner. + +**Example of commands:** + +``` +$ ./chip-tool any subscribe-by-id '0x0028,0x0028,0x0101,0x0028,0x0028,0x0028' '5,6,0,1,2,4' 100 1000 1 '0,0,1,0,0,0' --keepSubscriptions true +$ ./chip-tool any subscribe-by-id '0x0028,0x0028,0x0101,0x0028,0x0028,0x0028' '5,6,0,1,2,4' 100 1000 2 '0,0,1,0,0,0' --keepSubscriptions true --commissioner-name beta +$ ./chip-tool any subscribe-by-id '0x0028,0x0028,0x0101,0x0028,0x0028,0x0028' '5,6,0,1,2,4' 100 1000 3 '0,0,1,0,0,0' --keepSubscriptions true --commissioner-name gamma +``` + +#### `--commissioner-nodeid` flag + +This flag lets you select the node ID to use on the fabric specified with the +`--commissioner-name` flag. + +If you don't use this flag, the CHIP Tool assumes that the command is sent with +the ID value that the CHIP Tool has in storage. If there's none, the CHIP Tool +sends the command with the default fallback node ID `112233`. + +> **Note:** If the device has been already commissioned with a specific +> `--commissioner-nodeid`, you must always provide the `--commissioner-nodeid` +> flag with the CHIP Tool commands or update the Access Control List (ACL) on +> the device. Otherwise, the default fallback node ID `112233` is used and the +> communication will fail. + +**Example of commands:** + +``` +$ ./chip-tool pairing code-thread 1 hex:000030000150208562618342348532605109bd31cda6908667addca8789211addac0102c4a9 34970112332 --commissioner-name alpha --commissioner-nodeid 999999 +``` + +``` +$ ./chip-tool basicinformation read vendor-id --commissioner-name alpha --commissioner-nodeid 999999 +``` + +
+ ### Running a test suite against a paired peer device The CHIP Tool allows to run a set of tests, already compiled in the tool, @@ -693,6 +762,8 @@ against a paired Matter device. See the [Examples](#running-testclusters-test) section for an example of how to run a test from the test suite. +
+ ### Parsing the setup payload The CHIP Tool offers a utility for parsing the Matter onboarding setup payload @@ -722,6 +793,8 @@ Here, __ is the ID of the payload to be parsed. $ ./chip-tool payload parse-setup-payload 34970112332 ``` +
+ ### Parsing additional data payload To parse additional data payload, use the following command pattern: @@ -734,6 +807,8 @@ In this command: - __ is the ID of the payload with additional data to be parsed. +
+ ### Discover actions The `discover` command can be used to resolve node ID and discover available @@ -778,25 +853,111 @@ following command: $ ./chip-tool discover commissioners ``` +
+ ### Pairing -The `pairing` command supports different means regarding Matter device -commissioning procedure. +The `pairing` command supports different methods for Matter device commissioning +procedure. The recommended methods are the following: -Thread and Wi-Fi commissioning use cases are described in the -[Using the CHIP Tool for Matter device testing](#using-chip-tool-for-matter-device-testing) -section. +- `code-thread` - For Thread commissioning. +- `code-wifi` - For Wi-Fi commissioning. +- `code` - For commissioning the device when it is already present in an IP + network. + +Alternatively, you can also use the following methods described in the +[Using CHIP Tool for Matter device testing](#using-chip-tool-for-matter-device-testing) +section: -To list all `pairing` sub-commands, run the following command: +- `ble-thread` - For Thread commissioning; described under + [Commissioning into a Thread network over Bluetooth LE](#commissioning-into-a-thread-network-over-bluetooth-le). +- `ble-wifi` - For Wi-Fi commissioning; described under + [Commissioning into a Wi-Fi network over Bluetooth LE](#commissioning-into-a-wi-fi-network-over-bluetooth-le) +- `onnetwork` - For commissioning the device when it is already present in an + IP network; described under + [Commissioning with setup PIN code](#commissioning-with-setup-pin-code) + +To list all `pairing` sub-commands and commissioning methods, run the following +command: ``` $ ./chip-tool pairing ``` +**Example of commands:** + +The following command commissions the Thread device with the node ID `1` to the +Matter fabric. The `hex:...` parameter is the operational dataset that contains +information about the Thread network to which the device is going to be +commissioned. The onboarding dataset payload `34970112332` (short manual pairing +code) is used to discover and commission the device. + +``` +$ ./chip-tool pairing code-thread 1 hex:000030000150208562618342348532605109bd31cda6908667addca8789211addac0102c4a9 34970112332 +``` + +The following command commissions the Wi-Fi device with the node ID `1` to the +Matter fabric The SSID `wifi_test` and the password `admin123` is the required +information about the Wi-Fi network to which the device is going to be +commissioned. The onboarding dataset payload `34970112332` (short manual pairing +code) is used to discover and commission the device. + +``` +$ ./chip-tool pairing code-wifi 1 wifi_test admin123 34970112332 +``` + +The following command commissions the device with the node ID `1` to the Matter +fabric. The onboarding dataset payload `MT:8IXS142C00KA0648G00` (QR code +payload) is used to discover and commission the device. + +``` +$ ./chip-tool pairing code 1 MT:8IXS142C00KA0648G00 +``` + +#### Attestation-related flags + +The `pairing` commissioning command can be run with several flags that allow you +to modify attestation-related settings: + +- `--paa-trust-store-path` - Use to provide the path to the directory that + contains the information about Product Attestation Authority (PAA) + certificates. The path can be absolute or relative to the current working + directory. With this flag, the CHIP Tool looks for the PAA certificate that + matches the PAI and the DAC certificates programmed on the device. Without + this flag, the CHIP Tool uses the built-in test PAA certificate. + +- `--cd-trust-store-path` - Use to provide the path to the directory + containing the key that is used to validate the device's Certification + Declaration. The path can be absolute or relative to the current working + directory. With this flag, the CHIP tool looks for additional public keys, + in addition to the well-known built-in public keys (built-in public keys + `src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.cpp`), + to be used to validate Certification Declaration signatures. + +* `--only-allow-trusted-cd-keys` - Use to only allow the keys from + `--cd-trust-store-path` and not the built-in test key. If the flag is not + provided or it is provided with the value `false`, untrusted CD verifying + keys are allowed. If it is provided with the value `true` + (`--only-allow-trusted-cd-keys true`), test keys are disallowed and CD + signed with the test key will not be accepted. + +* `--bypass-attestation-verifier` - Use to bypass the attestation verifier. If + the flag is not provided or it is provided with the value `false`, the + attestation verifier is not bypassed. If it is provided with the value + `true` (`--bypass-attestation-verifier true`), the commissioning will + continue in case of the attestation verification failure. The failure can be + caused by errors in Certification Declaration, PAA or PAI certificates, or + in the Device Attestation Certificate. This option can be helpful if you + want to quickly commission a device with PAI and DAC certificates based on + an unknown PAA and/or with a Certification Declaration signed by an unknown + key. + +
+ ### Interacting with Data Model clusters As mentioned in the -[Using the CHIP Tool for Matter device testing](#using-chip-tool-for-matter-device-testing) +[Using CHIP Tool for Matter device testing](#using-chip-tool-for-matter-device-testing) section, executing the `chip-tool` command with a particular cluster name lists all operations supported for this cluster, as in the following command pattern: @@ -845,9 +1006,9 @@ cases. ##### Writing ACL to the `accesscontrol` cluster -The Access Control List (ACL) concept allows to govern all Data Model -interactions (such as read attribute, write attribute, invoke command). For more -information about ACL, see +The Access Control List concept allows to govern all Data Model interactions +(such as read attribute, write attribute, invoke command). For more information +about ACL, see [Access Control Guide](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/access-control-guide.md). To write ACL to the `accesscontrol` cluster, use the following command pattern: @@ -910,6 +1071,8 @@ Complete the following steps to Read the [CHIP Test Suits](../../src/app/tests/suites/README.md) page for more information about how the test suite is structured. +
+ ### Multi-admin scenario Multi-admin feature allows you to join Matter device to several Matter fabrics diff --git a/docs/guides/ti/matter_cc2674_migration.md b/docs/guides/ti/matter_cc2674_migration.md index 0590037ea03157..03a0c2e4f41e62 100644 --- a/docs/guides/ti/matter_cc2674_migration.md +++ b/docs/guides/ti/matter_cc2674_migration.md @@ -1,109 +1,124 @@ -# Running Matter Examples on the TI SimpleLink CC2674P10 and CC2674R10 - -The existing Matter project examples are based on LP_EM_CC1354P10_6. If using -the CC2674P10, the following migration steps are required. Developers are -strongly encouraged to start with a `cc13x4_26x4` example and migrate the -project accordingly. Example projects can be found in the following location: -`matter/examples/[application]/cc13x4_26x4` - -## Dependencies - -The following must be installed on your system before proceeding: - -- [SysConfig](https://www.ti.com/tool/SYSCONFIG) v1.16.2 or later -- [SIMPLELINK-LOWPOWER-F2-SDK](https://www.ti.com/tool/SIMPLELINK-LOWPOWER-SDK) - v7.10.01.24 - -## Matter source code changes - -The following are changes to the Matter source code files which should be -applied to convert a `matter/examples/[application]/cc13x4_26x4` project to the -CC2674P10 device - -- `examples/[application]/cc13x4_26x4/args.gni`, modify/add the following - defines for the CC2674 - - `ti_simplelink_board = CC2674` - - `ti_simplelink_device = CC2674P10RGZ` -- `third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx`, replace this folder - contents with the 7.10.01.24 version from - [TI's downloads page](https://www.ti.com/tool/download/SIMPLELINK-LOWPOWER-F2-SDK/7.10.01.24) - which is required to add support SDK for the CC2674P10 device. - -## Configuring `chip.syscfg` in the SysConfig GUI - -1. To open `matter/examples/[application]/cc13x4_26x4/chip.syscfg` in the GUI, - add the following line to the top of the file: - -``` - // @cliArgs --product /.metadata/product.json --board /ti/boards/LP_EM_CC1354P10_6 --rtos freertos -``` - -2. Open the `syscfg` file using the standalone Sysconfig GUI - (`sysconfig_gui.sh`) from the SysConfig installation folder. -3. Click on _Show Device View_ and then click _Switch_. -4. Select _Board_ as _None_ and _Device_ as _`CC2674P10RGZ`_, Unselect - _`Lock PinMux`_, and click _Confirm_. -5. To fix errors, make the following module changes: - - _RF Design_ and _RF Stacks -> BLE -> Radio_: click on _accepting the - current value_, which should be _`LP_CC2674P10_RGZ`_ in the drop down menu - for _Based On RF Design_ - - _TI DEVICES -> Device Configuration_: Clear - _`XOSC Cap Array Modification`_ - - _TI DRIVERS -> RF_: Set _Global Event Mask_ as _None_ and _No. of Antenna - Switch Control Pins_ as _0_ - - _TI DRIVERS -> UART2 -> `PinMux`_: Set _UART Peripheral_ to _UART0_, _TX - Pin_ to _`DIO_13/19`_, and _RX Pin_ to _`DIO_12/18`_ - - _TI DRIVERS APPS -> Button_: Set _`PinMux`_ of _CONFIG_BTN_LEFT_ to - _`DIO_15`_ and _CONFIG_BTN_RIGHT_ to _`DIO_14`_ - - _TI DRIVERS APPS -> LED_: Set _`PinMux`_ of _CONFIG_LED_RED_ to _`DIO_6`_ - and _CONFIG_LED_RIGHT_ to _`DIO_7`_ -6. Save the SysConfig file (click on _Save As_) and ensure the file name matches - the reference from `BUILD.gn` (default project name is `chip.syscfg`). -7. Open the new SysConfig file with a text editor and remove the generated - arguments. - ``` - /** - * These arguments were used when this file was generated. They will be automatically applied on subsequent loads - * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. - * @cliArgs --device "CC2674P10RGZ" --package "RGZ" --part "Default" --rtos "freertos" --product "simplelink_cc13xx_cc26xx_sdk@7.10.01.24" - * @versions {"tool":"1.18.0+3130"} - */ - ``` -8. Move the `*.syscfg` file into the - `matter/examples/[application]/cc13x4_26x4/` folder. Make sure that the - `args.gni` parameters are aligned for the `CC2674P10RGZ` as detailed above, - and build the example using the `README.md` instructions. - -## Modifications required for the CC2674R10 - -After applying all items in the "Configuring `chip.syscfg` in the SysConfig GUI" -section, additional steps must also be applied to generate Matter project for -the CC2674R10. - -- `examples/[application]/cc13x4_26x4/args.gni` should have - `ti_simplelink_board` as `CC2674` and `ti_simplelink_device = CC2674R10RGZ`. -- `examples/[application]/cc13x4_26x4/chip.syscfg` opened with a Text Editor - should change `ble.radioConfig.codeExportConfig.$name` to - `ti_devices_radioconfig_code_export_param2` and `ble.rfDesign` to - `LP_EM_CC1354P10_1` - -Furthermore, the subsequent changes apply specifically for the CC2674R10 and -should be addressed from a SysConfig Editor. - -1. Pins will need to be reconfigured as such: - - | SysConfig pin name | R10 `PinMux` | - | ------------------ | ------------ | - | UART_RX | `DIO_2` | - | UART_TX | `DIO_3` | - | CONFIG_BTN_LEFT | `DIO_13` | - | CONFIG_BTN_RIGHT | `DIO_14` | - | CONFIG_LED_RED | `DIO_6` | - | CONFIG_LED_GREEN | `DIO_7` | - -2. _Custom -> IEEE 802.15.4-2006, `250 kbps`, `OQPSK`, `DSSS = 1:8` -> Code - Export Configuration_, acknowledge and dismiss the PA radio setup error -3. _Custom -> IEEE 802.15.4-2006, `250 kbps`, `OQPSK`, `DSSS = 1:8` -> RF - Command Symbols_, change `CMD_RADIO_SETUP` from `RF_cmdRadioSetup` to - `RF_cmdIeeeRadioSetup` and add the following functions from the drop-down: - `CMD_TX_TEST`,`CMD_IEEE_ED_SCAN`, `CMD_IEEE_CSMA`, and `CMD_IEEE_RX_ACK`. +# Running Matter Examples on the TI SimpleLink CC2674P10 and CC2674R10 + +The existing Matter project examples are based on LP_EM_CC1354P10_6. If using +the CC2674P10, the following migration steps are required. Developers are +strongly encouraged to start with a `cc13x4_26x4` example and migrate the +project accordingly. Example projects can be found in the following location: +`matter/examples/[application]/cc13x4_26x4` + +## Dependencies + +The following must be installed on your system before proceeding: + +- [SysConfig](https://www.ti.com/tool/SYSCONFIG) v1.16.2 or later +- [SIMPLELINK-LOWPOWER-F2-SDK](https://www.ti.com/tool/SIMPLELINK-LOWPOWER-SDK) + v7.10.01.24 + +## Matter source code changes + +The following are changes to the Matter source code files which should be +applied to convert a `matter/examples/[application]/cc13x4_26x4` project to the +CC2674P10 device + +- `examples/[application]/cc13x4_26x4/args.gni`, modify/add the following + defines for the CC2674 + - `ti_simplelink_board = CC2674` + - `ti_simplelink_device = CC2674P10RGZ` +- `third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx`, replace this folder + contents with the 7.10.01.24 version from + [TI's downloads page](https://www.ti.com/tool/download/SIMPLELINK-LOWPOWER-F2-SDK/7.10.01.24) + which is required to add support SDK for the CC2674P10 device. + +## Configuring `chip.syscfg` in the SysConfig GUI + +1. To open `matter/examples/[application]/cc13x4_26x4/chip.syscfg` in the GUI, + add the following line to the top of the file: + +``` + // @cliArgs --product /.metadata/product.json --board /ti/boards/LP_EM_CC1354P10_6 --rtos freertos +``` + +2. Open the `syscfg` file using the standalone Sysconfig GUI + (`sysconfig_gui.sh`) from the SysConfig installation folder. +3. Click on _Show Device View_ and then click _Switch_. +4. Select _Board_ as _None_ and _Device_ as _`CC2674P10RGZ`_, Unselect + _`Lock PinMux`_, and click _Confirm_. +5. To fix errors, make the following module changes: + - _RF Design_ and _RF Stacks -> BLE -> Radio_: click on _accepting the + current value_, which should be _`LP_CC2674P10_RGZ`_ in the drop down menu + for _Based On RF Design_ + - _TI DEVICES -> Device Configuration_: Clear + _`XOSC Cap Array Modification`_ + - _TI DRIVERS -> RF_: Set _Global Event Mask_ as _None_ and _No. of Antenna + Switch Control Pins_ as _0_ + - _TI DRIVERS -> UART2 -> `PinMux`_: Set _UART Peripheral_ to _UART0_, _TX + Pin_ to _`DIO_13/19`_, and _RX Pin_ to _`DIO_12/18`_ + - _TI DRIVERS APPS -> Button_: Set _`PinMux`_ of _CONFIG_BTN_LEFT_ to + _`DIO_15`_ and _CONFIG_BTN_RIGHT_ to _`DIO_14`_ + - _TI DRIVERS APPS -> LED_: Set _`PinMux`_ of _CONFIG_LED_RED_ to _`DIO_6`_ + and _CONFIG_LED_RIGHT_ to _`DIO_7`_ +6. Save the SysConfig file (click on _Save As_) and ensure the file name matches + the reference from `BUILD.gn` (default project name is `chip.syscfg`). +7. Open the new SysConfig file with a text editor and remove the generated + arguments. + ``` + /** + * These arguments were used when this file was generated. They will be automatically applied on subsequent loads + * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. + * @cliArgs --device "CC2674P10RGZ" --package "RGZ" --part "Default" --rtos "freertos" --product "simplelink_cc13xx_cc26xx_sdk@7.10.01.24" + * @versions {"tool":"1.18.0+3130"} + */ + ``` +8. Move the `*.syscfg` file into the + `matter/examples/[application]/cc13x4_26x4/` folder. Make sure that the + `args.gni` parameters are aligned for the `CC2674P10RGZ` as detailed above, + and build the example using the `README.md` instructions. + +## Modifications required for the CC2674R10 + +After applying all items in the "Configuring `chip.syscfg` in the SysConfig GUI" +section, additional steps must also be applied to generate Matter project for +the CC2674R10. + +- `examples/[application]/cc13x4_26x4/args.gni` should have + `ti_simplelink_board` as `CC2674` and `ti_simplelink_device = CC2674R10RGZ`. +- `examples/[application]/cc13x4_26x4/chip.syscfg` opened with a Text Editor + should change `ble.radioConfig.codeExportConfig.$name` to + `ti_devices_radioconfig_code_export_param2` and `ble.rfDesign` to + `LP_EM_CC1354P10_1` + +Furthermore, the subsequent changes apply specifically for the CC2674R10 and +should be addressed from a SysConfig Editor. + +1. Pins will need to be reconfigured as such: + + | SysConfig pin name | R10 `PinMux` | + | ------------------ | ------------ | + | UART_RX | `DIO_2` | + | UART_TX | `DIO_3` | + | CONFIG_BTN_LEFT | `DIO_13` | + | CONFIG_BTN_RIGHT | `DIO_14` | + | CONFIG_LED_RED | `DIO_6` | + | CONFIG_LED_GREEN | `DIO_7` | + +2. _Custom -> IEEE 802.15.4-2006, `250 kbps`, `OQPSK`, `DSSS = 1:8` -> Code + Export Configuration_, acknowledge and dismiss the PA radio setup error +3. _Custom -> IEEE 802.15.4-2006, `250 kbps`, `OQPSK`, `DSSS = 1:8` -> RF + Command Symbols_, change `CMD_RADIO_SETUP` from `RF_cmdRadioSetup` to + `RF_cmdIeeeRadioSetup` and add the following functions from the drop-down: + `CMD_TX_TEST`,`CMD_IEEE_ED_SCAN`, `CMD_IEEE_CSMA`, and `CMD_IEEE_RX_ACK`. + +## Building examples for the CC1354P10-1 + +To migrate the CC1354P10-6 examples to the CC1354P10-1 platform, there are only +two steps: + +1. `examples/[application]/cc13x4_26x4/args.gni` should have + `ti_simplelink_board` as `CC1354P10-1` +2. `examples/[application]/cc13x4_26x4/chip.syscfg` opened with a Text Editor + should change `ble.radioConfig.codeExportConfig.$name` to + `ti_devices_radioconfig_code_export_param2` and `ble.rfDesign` to + `LP_EM_CC1354P10_1` + +After this, the example's `README.md` instructions can be followed to produce +the executable needed. 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 f42f02a87f8a82..c48282979c4341 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 @@ -7204,9 +7204,9 @@ endpoint 1 { } server cluster FlowMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; + ram attribute measuredValue default = 5; + ram attribute minMeasuredValue default = 0; + ram attribute maxMeasuredValue default = 100; ram attribute tolerance default = 0; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; 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 785e3aaef11fe8..fb5b94436d0176 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 @@ -23526,7 +23526,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -23542,7 +23542,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -23558,7 +23558,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "100", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -35392,5 +35392,6 @@ "endpointId": 65534, "networkId": 0 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/java-matter-controller/Manifest.txt b/examples/java-matter-controller/Manifest.txt index f9f5a70c109c59..ff412c89d3fa20 100644 --- a/examples/java-matter-controller/Manifest.txt +++ b/examples/java-matter-controller/Manifest.txt @@ -1,3 +1,3 @@ Main-Class: com.matter.controller.MainKt -Class-Path: ../lib/third_party/connectedhomeip/src/controller/java/CHIPController.jar ../lib/third_party/connectedhomeip/src/setup_payload/java/OnboardingPayload.jar ../lib/third_party/connectedhomeip/third_party/java_deps/stub_src/Android.jar ../lib/third_party/connectedhomeip/third_party/java_deps/json-20220924.jar ../lib/third_party/connectedhomeip/third_party/java_deps/jsr305-3.0.2.jar ../lib/third_party/connectedhomeip/third_party/java_deps/kotlin-stdlib-1.8.10.jar +Class-Path: ../lib/third_party/connectedhomeip/src/controller/java/CHIPController.jar ../lib/third_party/connectedhomeip/src/setup_payload/java/OnboardingPayload.jar ../lib/third_party/connectedhomeip/third_party/java_deps/stub_src/Android.jar ../lib/third_party/connectedhomeip/third_party/java_deps/json-20220924.jar ../lib/third_party/connectedhomeip/third_party/java_deps/jsr305-3.0.2.jar ../lib/third_party/connectedhomeip/third_party/java_deps/kotlin-stdlib-1.8.20.jar diff --git a/examples/platform/silabs/efr32/rs911x/hal/sl_board_configuration.h b/examples/platform/silabs/efr32/rs911x/hal/sl_board_configuration.h index 232a61eaa5a756..056fb22817d22d 100644 --- a/examples/platform/silabs/efr32/rs911x/hal/sl_board_configuration.h +++ b/examples/platform/silabs/efr32/rs911x/hal/sl_board_configuration.h @@ -28,19 +28,22 @@ typedef struct (sl_pin_t) { .port = gpioPort##port_id, .pin = pin_id } #define PACKET_PENDING_INT_PRI 3 - -#if defined(EFR32MG24_BRD4186C) || defined(BRD4186C) +#if defined(EFR32MG12_BRD4161A) || defined(BRD4161A) || defined(EFR32MG12_BRD4162A) || defined(BRD4162A) || \ + defined(EFR32MG12_BRD4163A) || defined(BRD4163A) || defined(EFR32MG12_BRD4164A) || defined(BRD4164A) || \ + defined(EFR32MG12_BRD4170A) || defined(BRD4170A) +// BRD4161-63-64 are pin to pin compatible for SPI +#include "brd4161a.h" +#elif defined(EFR32MG24_BRD4186C) || defined(BRD4186C) #include "brd4186c.h" #elif defined(EFR32MG24_BRD4187C) || defined(BRD4187C) #include "brd4187c.h" #else #error "Need SPI Pins" -#endif /* EFR32MG12_BRD4161A */ -#if EXP_BOARD && (defined(EFR32MG24_BRD4187C) || defined(BRD4187C) || defined(EFR32MG24_BRD4186C) || defined(BRD4186C)) +#endif +#if EXP_BOARD #define RESET_PIN PIN(A, 6) #define INTERRUPT_PIN PIN(A, 7) #define SLEEP_CONFIRM_PIN PIN(A, 5) /* Exp hdr 7 */ -#define SL_WFX_HOST_PINOUT_SPI_IRQ 5 #endif #define NETWORK_INTERFACE_VALID(x) (x == SL_NET_DEFAULT_WIFI_CLIENT_INTERFACE) || (x == SL_NET_DEFAULT_WIFI_AP_INTERFACE) diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index 969f3c14638ae3..bf7c87efe70c33 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -34,11 +34,6 @@ #include "OTAUtil.h" #endif -#ifdef CONFIG_CHIP_ICD_SUBSCRIPTION_HANDLING -#include "ICDUtil.h" -#include -#endif - #include #include @@ -322,10 +317,6 @@ CHIP_ERROR AppTaskCommon::InitCommonParts(void) emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); #endif -#ifdef CONFIG_CHIP_ICD_SUBSCRIPTION_HANDLING - chip::app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(&GetICDUtil()); -#endif - // We need to disable OpenThread to prevent writing to the NVS storage when factory reset occurs // The OpenThread thread is running during factory reset. The nvs_clear function is called during // factory reset, which makes the NVS storage innaccessible, but the OpenThread knows nothing diff --git a/examples/rvc-app/README.md b/examples/rvc-app/README.md index a5d68613fc88bc..cd8bc0461fcbc1 100644 --- a/examples/rvc-app/README.md +++ b/examples/rvc-app/README.md @@ -57,7 +57,7 @@ Example command: PIXIT: `PIXIT_ENDPOINT:1 PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2` Example command: -`/scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1 PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2"` +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1 PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2"` When asked "Manually put the device in a state from which it will FAIL to transition to mode 1", set the `RvcRunMode` to 1. @@ -69,8 +69,11 @@ transition to mode 2", set the `RvcRunMode` to 0. #### TC 3.2 -This is not applicable because this RVC device does not support the -`StartUpMode` attribute. +PIXIT: `PIXIT_ENDPOINT:1` +Example command: +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_3_2.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1"` + +When asked "Physically power cycle the device", do so. ### RVC Run Mode cluster diff --git a/examples/rvc-app/run_all_yaml_tests.sh b/examples/rvc-app/run_all_yaml_tests.sh index a599a6139cdf95..4bf9e7261a7f9e 100755 --- a/examples/rvc-app/run_all_yaml_tests.sh +++ b/examples/rvc-app/run_all_yaml_tests.sh @@ -8,10 +8,7 @@ NODEID=$1 RVC_DEVICE_ENDPOINT=1 - -PICS_RUN="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt" -PICS_CLEAN="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt" -PICS_OP_STATE="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt" +RVC_DEVICE_PICS="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt" if [ -z "$NODEID" ]; then echo "Usage: run_all_yaml_tests [Node ID]" @@ -19,12 +16,12 @@ if [ -z "$NODEID" ]; then fi # RVC Clean Mode cluster -./scripts/tests/yaml/chiptool.py tests Test_TC_RVCCLEANM_1_1 --PICS "$PICS_CLEAN" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && +./scripts/tests/yaml/chiptool.py tests Test_TC_RVCCLEANM_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && # RVC Operational State cluster - ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_1_1 --PICS "$PICS_OP_STATE" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && - ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_2_2 --PICS "$PICS_OP_STATE" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && + ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && + ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_2_2 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && # RVC Run Mode cluster - ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCRUNM_1_1 --PICS "$PICS_RUN" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && + ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCRUNM_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && echo done diff --git a/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml b/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml index ce0ddaa38b5307..c5776d9553a9bb 100644 --- a/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml +++ b/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml @@ -61,7 +61,7 @@ Draft Does the device implement the StartUpMode attribute? 89.2.2. Attributes - allclusters.html[pdf] O - false + true RVCCLEANM.S.A0003 diff --git a/examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt b/examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt index d0c8529a83d2e0..c4c5ef7586bdce 100644 --- a/examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt +++ b/examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt @@ -1,7 +1,7 @@ RVCCLEANM.S=1 RVCCLEANM.S.A0000=1 RVCCLEANM.S.A0001=1 -RVCCLEANM.S.A0002=0 +RVCCLEANM.S.A0002=1 RVCCLEANM.S.A0003=0 RVCCLEANM.S.C01.Tx=1 RVCCLEANM.S.C00.Rsp=1 diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index fae920d56cafae..a337abfc3f47f2 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -929,6 +929,7 @@ server cluster RvcCleanMode = 85 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; + attribute nullable int8u startUpMode = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1174,6 +1175,7 @@ endpoint 1 { server cluster RvcCleanMode { callback attribute supportedModes; callback attribute currentMode; + callback attribute startUpMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; diff --git a/examples/rvc-app/rvc-common/rvc-app.zap b/examples/rvc-app/rvc-common/rvc-app.zap index 34580f98854834..b51d888203a786 100644 --- a/examples/rvc-app/rvc-common/rvc-app.zap +++ b/examples/rvc-app/rvc-common/rvc-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 12, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 177, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 177, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 177 - ], "deviceVersions": [ 1 ], @@ -5420,10 +5415,9 @@ ] }, { - "id": 11, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 225, "code": 116, "profileId": 259, "label": "MA-robotic-vacuum-cleaner", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 225, "code": 116, "profileId": 259, "label": "MA-robotic-vacuum-cleaner", "name": "MA-robotic-vacuum-cleaner" } ], - "deviceTypeRefs": [ - 225 - ], "deviceVersions": [ 1 ], @@ -7705,11 +7695,11 @@ "mfgCode": null, "side": "server", "type": "int8u", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 5322345f2c0a48..d1476c61035c38 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -337,10 +337,10 @@ void InteractionModelEngine::OnDone(ReadHandler & apReadObj) #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS && CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION if (!mSubscriptionResumptionScheduled && HasSubscriptionsToResume()) { - mSubscriptionResumptionScheduled = true; - auto timeTillNextResubscriptionSecs = ComputeTimeSecondsTillNextSubscriptionResumption(); - mpExchangeMgr->GetSessionManager()->SystemLayer()->StartTimer(System::Clock::Seconds32(timeTillNextResubscriptionSecs), - ResumeSubscriptionsTimerCallback, this); + mSubscriptionResumptionScheduled = true; + auto timeTillNextSubscriptionResumptionSecs = ComputeTimeSecondsTillNextSubscriptionResumption(); + mpExchangeMgr->GetSessionManager()->SystemLayer()->StartTimer( + System::Clock::Seconds32(timeTillNextSubscriptionResumptionSecs), ResumeSubscriptionsTimerCallback, this); mNumSubscriptionResumptionRetries++; } #endif // CHIP_CONFIG_PERSIST_SUBSCRIPTIONS diff --git a/src/darwin/Framework/CHIP/MTRAsyncCallbackWorkQueue.h b/src/darwin/Framework/CHIP/MTRAsyncCallbackWorkQueue.h index 346af1edfd7fcf..4615c143da6ed7 100644 --- a/src/darwin/Framework/CHIP/MTRAsyncCallbackWorkQueue.h +++ b/src/darwin/Framework/CHIP/MTRAsyncCallbackWorkQueue.h @@ -15,7 +15,7 @@ * limitations under the License. */ -#import +#import NS_ASSUME_NONNULL_BEGIN @@ -23,59 +23,27 @@ NS_ASSUME_NONNULL_BEGIN typedef void (^MTRAsyncCallbackReadyHandler)(id context, NSUInteger retryCount); -// MTRAsyncCallbackQueue high level description -// The MTRAsyncCallbackQueue was made to call one readyHandler -// block at a time asynchronously, and the readyHandler is -// expected to start/schedule a task. When the task finishes -// asynchronously in the future (at any time, from any queue -// or thread), it is expected to ask the workItem object to -// either endWork or retryWork. - -// Sequence of steps when queuing a work item: -// - Create MTRAsyncCallbackQueueWorkItem object -// - Create ready handler block (MTRAsyncCallbackReadyHandler) -// - block is called when it's the WorkItem's turn to do work -// - its body is to perform a task that is expected to end asynchronously in the future -// - at the end of work, call on the work item object: -// - endWork for success or failure -// - retryWork for temporary failures -// - Set the readyHandler block on the WorkItem object -// - Call enqueueWorkItem on a MTRAsyncCallbackQueue - -// A serial one-at-a-time queue for performing work items +MTR_NEWLY_DEPRECATED("This class was not intended to be part of the public Matter API") @interface MTRAsyncCallbackWorkQueue : NSObject - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; -// The context object is only held and passed back as a reference and is opaque to the work queue - (instancetype)initWithContext:(id _Nullable)context queue:(dispatch_queue_t)queue; - -// Called by the work queue owner to clean up and cancel work items - (void)invalidate; - -// Work items may be enqueued from any queue or thread -// Note: Once a work item is enqueued, its handlers cannot be modified - (void)enqueueWorkItem:(MTRAsyncCallbackQueueWorkItem *)item; @end -// An item in the work queue +MTR_NEWLY_DEPRECATED("This class was not intended to be part of the public Matter API") @interface MTRAsyncCallbackQueueWorkItem : NSObject - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; -// Both readyHandler and cancelHander will be called on the queue given to initWithQueue - (instancetype)initWithQueue:(dispatch_queue_t)queue; + @property (nonatomic, strong) MTRAsyncCallbackReadyHandler readyHandler; @property (nonatomic, strong) dispatch_block_t cancelHandler; -// Called by the creater of the work item when async work is done and should -// be removed from the queue. The work queue will run the next work item. -// Note: This must only be called from within the readyHandler - (void)endWork; - -// Called by the creater of the work item when async work should be retried. -// The work queue will call this workItem's readyHandler again. -// Note: This must only be called from within the readyHandler - (void)retryWork; @end diff --git a/src/darwin/Framework/CHIP/MTRAsyncCallbackWorkQueue.mm b/src/darwin/Framework/CHIP/MTRAsyncCallbackWorkQueue.mm index 193a4ce7a038d2..ad6900a001f41e 100644 --- a/src/darwin/Framework/CHIP/MTRAsyncCallbackWorkQueue.mm +++ b/src/darwin/Framework/CHIP/MTRAsyncCallbackWorkQueue.mm @@ -18,8 +18,8 @@ #import #import -#import "MTRAsyncCallbackWorkQueue_Internal.h" #import "MTRLogging_Internal.h" +#import #pragma mark - Class extensions @@ -62,7 +62,6 @@ - (instancetype)initWithContext:(id)context queue:(dispatch_queue_t)queue _context = context; _queue = queue; _items = [NSMutableArray array]; - MTR_LOG_INFO("MTRAsyncCallbackWorkQueue init for context %@", context); } return self; } @@ -103,8 +102,6 @@ - (void)invalidate _items = nil; os_unfair_lock_unlock(&_lock); - MTR_LOG_INFO( - "MTRAsyncCallbackWorkQueue invalidate for context %@ items count: %lu", _context, (unsigned long) invalidateItems.count); for (MTRAsyncCallbackQueueWorkItem * item in invalidateItems) { [item cancel]; } @@ -169,50 +166,10 @@ - (void)_callNextReadyWorkItem self.runningWorkItemCount = 1; MTRAsyncCallbackQueueWorkItem * workItem = self.items.firstObject; - - // Check if batching is possible or needed. Only ask work item to batch once for simplicity - if (workItem.batchable && workItem.batchingHandler && (workItem.retryCount == 0)) { - while (self.items.count >= 2) { - MTRAsyncCallbackQueueWorkItem * nextWorkItem = self.items[1]; - if (!nextWorkItem.batchable || (nextWorkItem.batchingID != workItem.batchingID)) { - // next item is not eligible to merge with this one - break; - } - - BOOL fullyMerged = NO; - workItem.batchingHandler(workItem.batchableData, nextWorkItem.batchableData, &fullyMerged); - if (!fullyMerged) { - // We can't remove the next work item, so we can't merge anything else into this one. - break; - } - - [self.items removeObjectAtIndex:1]; - } - } - [workItem callReadyHandlerWithContext:self.context]; } } -- (BOOL)isDuplicateForTypeID:(NSUInteger)opaqueDuplicateTypeID workItemData:(id)opaqueWorkItemData -{ - os_unfair_lock_lock(&_lock); - // Start from the last item - for (NSUInteger i = self.items.count; i > 0; i--) { - MTRAsyncCallbackQueueWorkItem * item = self.items[i - 1]; - BOOL isDuplicate = NO; - BOOL stop = NO; - if (item.supportsDuplicateCheck && (item.duplicateTypeID == opaqueDuplicateTypeID) && item.duplicateCheckHandler) { - item.duplicateCheckHandler(opaqueWorkItemData, &isDuplicate, &stop); - if (stop) { - os_unfair_lock_unlock(&_lock); - return isDuplicate; - } - } - } - os_unfair_lock_unlock(&_lock); - return NO; -} @end @implementation MTRAsyncCallbackQueueWorkItem @@ -319,23 +276,4 @@ - (void)cancel } } -- (void)setBatchingID:(NSUInteger)opaqueBatchingID - data:(id)opaqueBatchableData - handler:(MTRAsyncCallbackBatchingHandler)batchingHandler -{ - os_unfair_lock_lock(&self->_lock); - _batchable = YES; - _batchingID = opaqueBatchingID; - _batchableData = opaqueBatchableData; - _batchingHandler = batchingHandler; - os_unfair_lock_unlock(&self->_lock); -} - -- (void)setDuplicateTypeID:(NSUInteger)opaqueDuplicateTypeID handler:(MTRAsyncCallbackDuplicateCheckHandler)duplicateCheckHandler -{ - _supportsDuplicateCheck = YES; - _duplicateTypeID = opaqueDuplicateTypeID; - _duplicateCheckHandler = duplicateCheckHandler; -} - @end diff --git a/src/darwin/Framework/CHIP/MTRAsyncWorkQueue.h b/src/darwin/Framework/CHIP/MTRAsyncWorkQueue.h new file mode 100644 index 00000000000000..259bf1dbc78a25 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRAsyncWorkQueue.h @@ -0,0 +1,84 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "MTRDefines_Internal.h" + +NS_ASSUME_NONNULL_BEGIN + +@class MTRAsyncWorkItem; + +typedef void (^MTRAsyncWorkReadyHandler)(id context, NSUInteger retryCount); + +// MTRAsyncWorkQueue high level description +// The MTRAsyncWorkQueue was made to call one readyHandler +// block at a time asynchronously, and the readyHandler is +// expected to start/schedule a task. When the task finishes +// asynchronously in the future (at any time, from any queue +// or thread), it is expected to ask the workItem object to +// either endWork or retryWork. + +// Sequence of steps when queuing a work item: +// - Create MTRAsyncWorkItem object +// - Create ready handler block (MTRAsyncWorkReadyHandler) +// - block is called when it's the WorkItem's turn to do work +// - its body is to perform a task that is expected to end asynchronously in the future +// - at the end of work, call on the work item object: +// - endWork for success or failure +// - retryWork for temporary failures +// - Set the readyHandler block on the WorkItem object +// - Call enqueueWorkItem on a MTRAsyncWorkQueue + +// A serial one-at-a-time queue for performing work items +MTR_TESTABLE +@interface MTRAsyncWorkQueue : NSObject +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +// The context object is only held and passed back as a reference and is opaque to the work queue +- (instancetype)initWithContext:(id _Nullable)context queue:(dispatch_queue_t)queue; + +// Called by the work queue owner to clean up and cancel work items +- (void)invalidate; + +// Work items may be enqueued from any queue or thread +// Note: Once a work item is enqueued, its handlers cannot be modified +- (void)enqueueWorkItem:(MTRAsyncWorkItem *)item; +@end + +// An item in the work queue +MTR_TESTABLE +@interface MTRAsyncWorkItem : NSObject +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +// Both readyHandler and cancelHander will be called on the queue given to initWithQueue +- (instancetype)initWithQueue:(dispatch_queue_t)queue; +@property (nonatomic, strong) MTRAsyncWorkReadyHandler readyHandler; +@property (nonatomic, strong) dispatch_block_t cancelHandler; + +// Called by the creater of the work item when async work is done and should +// be removed from the queue. The work queue will run the next work item. +// Note: This must only be called from within the readyHandler +- (void)endWork; + +// Called by the creater of the work item when async work should be retried. +// The work queue will call this workItem's readyHandler again. +// Note: This must only be called from within the readyHandler +- (void)retryWork; +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRAsyncWorkQueue.mm b/src/darwin/Framework/CHIP/MTRAsyncWorkQueue.mm new file mode 100644 index 00000000000000..98291126a31728 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRAsyncWorkQueue.mm @@ -0,0 +1,339 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +#import "MTRAsyncWorkQueue_Internal.h" +#import "MTRLogging_Internal.h" + +#pragma mark - Class extensions + +@interface MTRAsyncWorkQueue () +// The lock protects the internal state of the work queue so that these may be called from any queue or thread: +// -enqueueWorkItem: +// -invalidate +// -endWork: +// -retryWork: +@property (nonatomic, readonly) os_unfair_lock lock; +@property (nonatomic, strong, readonly) id context; +@property (nonatomic, strong, readonly) dispatch_queue_t queue; +@property (nonatomic, strong, readonly) NSMutableArray * items; +@property (nonatomic, readwrite) NSUInteger runningWorkItemCount; + +// For WorkItem's use only - the parameter is for sanity check +- (void)endWork:(MTRAsyncWorkItem *)workItem; +- (void)retryWork:(MTRAsyncWorkItem *)workItem; +@end + +@interface MTRAsyncWorkItem () +@property (nonatomic, readonly) os_unfair_lock lock; +@property (nonatomic, strong, readonly) dispatch_queue_t queue; +@property (nonatomic, readwrite) NSUInteger retryCount; +@property (nonatomic, strong) MTRAsyncWorkQueue * workQueue; +@property (nonatomic, readonly) BOOL enqueued; +// Called by the queue +- (void)markedEnqueued; +- (void)callReadyHandlerWithContext:(id)context; +- (void)cancel; +@end + +#pragma mark - Class implementations + +@implementation MTRAsyncWorkQueue +- (instancetype)initWithContext:(id)context queue:(dispatch_queue_t)queue +{ + if (self = [super init]) { + _lock = OS_UNFAIR_LOCK_INIT; + _context = context; + _queue = queue; + _items = [NSMutableArray array]; + MTR_LOG_INFO("MTRAsyncCallbackWorkQueue init for context %@", context); + } + return self; +} + +- (NSString *)description +{ + os_unfair_lock_lock(&_lock); + + auto * desc = [NSString + stringWithFormat:@"MTRAsyncCallbackWorkQueue context: %@ items count: %lu", self.context, (unsigned long) self.items.count]; + + os_unfair_lock_unlock(&_lock); + + return desc; +} + +- (void)enqueueWorkItem:(MTRAsyncWorkItem *)item +{ + if (item.enqueued) { + MTR_LOG_ERROR("MTRAsyncCallbackWorkQueue enqueueWorkItem: item cannot be enqueued twice"); + return; + } + + [item markedEnqueued]; + + os_unfair_lock_lock(&_lock); + item.workQueue = self; + [self.items addObject:item]; + + [self _callNextReadyWorkItem]; + os_unfair_lock_unlock(&_lock); +} + +- (void)invalidate +{ + os_unfair_lock_lock(&_lock); + NSMutableArray * invalidateItems = _items; + _items = nil; + os_unfair_lock_unlock(&_lock); + + MTR_LOG_INFO( + "MTRAsyncCallbackWorkQueue invalidate for context %@ items count: %lu", _context, (unsigned long) invalidateItems.count); + for (MTRAsyncWorkItem * item in invalidateItems) { + [item cancel]; + } + [invalidateItems removeAllObjects]; +} + +// called after executing a work item +- (void)_postProcessWorkItem:(MTRAsyncWorkItem *)workItem retry:(BOOL)retry +{ + os_unfair_lock_lock(&_lock); + // sanity check if running + if (!self.runningWorkItemCount) { + // something is wrong with state - nothing is currently running + os_unfair_lock_unlock(&_lock); + MTR_LOG_ERROR("MTRAsyncCallbackWorkQueue endWork: no work is running on work queue"); + return; + } + + // sanity check the same work item is running + // when "concurrency width" is implemented need to check first N items + MTRAsyncWorkItem * firstWorkItem = self.items.firstObject; + if (firstWorkItem != workItem) { + // something is wrong with this work item - should not be currently running + os_unfair_lock_unlock(&_lock); + MTR_LOG_ERROR("MTRAsyncCallbackWorkQueue endWork: work item is not first on work queue"); + return; + } + + // if work item is done (no need to retry), remove from queue and call ready on the next item + if (!retry) { + [self.items removeObjectAtIndex:0]; + } + + // when "concurrency width" is implemented this will be decremented instead + self.runningWorkItemCount = 0; + [self _callNextReadyWorkItem]; + os_unfair_lock_unlock(&_lock); +} + +- (void)endWork:(MTRAsyncWorkItem *)workItem +{ + [self _postProcessWorkItem:workItem retry:NO]; +} + +- (void)retryWork:(MTRAsyncWorkItem *)workItem +{ + [self _postProcessWorkItem:workItem retry:YES]; +} + +// assume lock is held while calling this +- (void)_callNextReadyWorkItem +{ + // when "concurrency width" is implemented this will be checked against the width + if (self.runningWorkItemCount) { + // can't run next work item until the current one is done + return; + } + + // only proceed to mark queue as running if there are items to run + if (self.items.count) { + // when "concurrency width" is implemented this will be incremented instead + self.runningWorkItemCount = 1; + + MTRAsyncWorkItem * workItem = self.items.firstObject; + + // Check if batching is possible or needed. Only ask work item to batch once for simplicity + if (workItem.batchable && workItem.batchingHandler && (workItem.retryCount == 0)) { + while (self.items.count >= 2) { + MTRAsyncWorkItem * nextWorkItem = self.items[1]; + if (!nextWorkItem.batchable || (nextWorkItem.batchingID != workItem.batchingID)) { + // next item is not eligible to merge with this one + break; + } + + BOOL fullyMerged = NO; + workItem.batchingHandler(workItem.batchableData, nextWorkItem.batchableData, &fullyMerged); + if (!fullyMerged) { + // We can't remove the next work item, so we can't merge anything else into this one. + break; + } + + [self.items removeObjectAtIndex:1]; + } + } + + [workItem callReadyHandlerWithContext:self.context]; + } +} + +- (BOOL)isDuplicateForTypeID:(NSUInteger)opaqueDuplicateTypeID workItemData:(id)opaqueWorkItemData +{ + os_unfair_lock_lock(&_lock); + // Start from the last item + for (NSUInteger i = self.items.count; i > 0; i--) { + MTRAsyncWorkItem * item = self.items[i - 1]; + BOOL isDuplicate = NO; + BOOL stop = NO; + if (item.supportsDuplicateCheck && (item.duplicateTypeID == opaqueDuplicateTypeID) && item.duplicateCheckHandler) { + item.duplicateCheckHandler(opaqueWorkItemData, &isDuplicate, &stop); + if (stop) { + os_unfair_lock_unlock(&_lock); + return isDuplicate; + } + } + } + os_unfair_lock_unlock(&_lock); + return NO; +} +@end + +@implementation MTRAsyncWorkItem + +- (instancetype)initWithQueue:(dispatch_queue_t)queue +{ + if (self = [super init]) { + _lock = OS_UNFAIR_LOCK_INIT; + _queue = queue; + } + return self; +} + +// assume lock is held +- (void)_invalidate +{ + // Make sure we don't leak via handlers that close over us, as ours must. + // This is a bit odd, since these are supposed to be non-nullable + // properties, but it's the best we can do given our API surface, unless we + // assume that all consumers consistently use __weak refs to us inside their + // handlers. + // + // Setting the attributes to nil will not compile; set the ivars directly. + _readyHandler = nil; + _cancelHandler = nil; +} + +- (void)invalidate +{ + os_unfair_lock_lock(&_lock); + [self _invalidate]; + os_unfair_lock_unlock(&_lock); +} + +- (void)markedEnqueued +{ + os_unfair_lock_lock(&_lock); + _enqueued = YES; + os_unfair_lock_unlock(&_lock); +} + +- (void)setReadyHandler:(MTRAsyncWorkReadyHandler)readyHandler +{ + os_unfair_lock_lock(&_lock); + if (!_enqueued) { + _readyHandler = readyHandler; + } + os_unfair_lock_unlock(&_lock); +} + +- (void)setCancelHandler:(dispatch_block_t)cancelHandler +{ + os_unfair_lock_lock(&_lock); + if (!_enqueued) { + _cancelHandler = cancelHandler; + } + os_unfair_lock_unlock(&_lock); +} + +- (void)endWork +{ + [self.workQueue endWork:self]; + [self invalidate]; +} + +- (void)retryWork +{ + [self.workQueue retryWork:self]; +} + +// Called by the work queue +- (void)callReadyHandlerWithContext:(id)context +{ + dispatch_async(self.queue, ^{ + os_unfair_lock_lock(&self->_lock); + MTRAsyncWorkReadyHandler readyHandler = self->_readyHandler; + NSUInteger retryCount = self->_retryCount; + if (readyHandler) { + self->_retryCount++; + } + os_unfair_lock_unlock(&self->_lock); + + if (readyHandler == nil) { + // Nothing to do here. + [self endWork]; + } else { + readyHandler(context, retryCount); + } + }); +} + +// Called by the work queue +- (void)cancel +{ + os_unfair_lock_lock(&self->_lock); + dispatch_block_t cancelHandler = self->_cancelHandler; + [self _invalidate]; + os_unfair_lock_unlock(&self->_lock); + + if (cancelHandler) { + dispatch_async(self.queue, ^{ + cancelHandler(); + }); + } +} + +- (void)setBatchingID:(NSUInteger)opaqueBatchingID data:(id)opaqueBatchableData handler:(MTRAsyncWorkBatchingHandler)batchingHandler +{ + os_unfair_lock_lock(&self->_lock); + _batchable = YES; + _batchingID = opaqueBatchingID; + _batchableData = opaqueBatchableData; + _batchingHandler = batchingHandler; + os_unfair_lock_unlock(&self->_lock); +} + +- (void)setDuplicateTypeID:(NSUInteger)opaqueDuplicateTypeID handler:(MTRAsyncWorkDuplicateCheckHandler)duplicateCheckHandler +{ + _supportsDuplicateCheck = YES; + _duplicateTypeID = opaqueDuplicateTypeID; + _duplicateCheckHandler = duplicateCheckHandler; +} + +@end diff --git a/src/darwin/Framework/CHIP/MTRAsyncCallbackWorkQueue_Internal.h b/src/darwin/Framework/CHIP/MTRAsyncWorkQueue_Internal.h similarity index 84% rename from src/darwin/Framework/CHIP/MTRAsyncCallbackWorkQueue_Internal.h rename to src/darwin/Framework/CHIP/MTRAsyncWorkQueue_Internal.h index 7abbb9cf10a83c..54995effd8a8c7 100644 --- a/src/darwin/Framework/CHIP/MTRAsyncCallbackWorkQueue_Internal.h +++ b/src/darwin/Framework/CHIP/MTRAsyncWorkQueue_Internal.h @@ -17,7 +17,7 @@ #import -#import "MTRAsyncCallbackWorkQueue.h" +#import "MTRAsyncWorkQueue.h" NS_ASSUME_NONNULL_BEGIN @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN // - The "batching ID" is used for grouping mergeable work items with unique merging strategies. The ID value is opaque to this // API, and the API client is responsible for assigning them. // - Each work item will only be asked to batch before it's first dequeued to run readyHandler. -// See the MTRAsyncCallbackBatchingHandler definition for more details. +// See the MTRAsyncWorkBatchingHandler definition for more details. // The batching handler is called by the work queue when all of the following are true: // @@ -47,14 +47,14 @@ NS_ASSUME_NONNULL_BEGIN // // If *fullyMerged is set to YES, this handler may be called again to possibly also batch the work item // after the one that was dropped. -typedef void (^MTRAsyncCallbackBatchingHandler)(id opaqueDataCurrent, id opaqueDataNext, BOOL * fullyMerged); +typedef void (^MTRAsyncWorkBatchingHandler)(id opaqueDataCurrent, id opaqueDataNext, BOOL * fullyMerged); // Optional feature: Duplicate Filtering // This is a facility that enables the API client to check if a potential work item has already been enqueued. By providing a // handler that can answer if a work item's relevant data is a duplicate, it can avoid redundant queuing of requests. // - The "duplicate type ID" is used for grouping different types of work items for duplicate checking. The ID value is opaque // to this API, and the API client is responsible for assigning them. -// See the MTRAsyncCallbackDuplicateCheckHandler definition and the WorkQueue's -isDuplicateForTypeID:workItemData: method +// See the MTRAsyncWorkDuplicateCheckHandler definition and the WorkQueue's -isDuplicateForTypeID:workItemData: method // descriptions for more details. // The duplicate check handler is called by the work queue when the client wishes to check whether a work item is a duplicate of an @@ -68,9 +68,9 @@ typedef void (^MTRAsyncCallbackBatchingHandler)(id opaqueDataCurrent, id opaqueD // // If the handler is unable to determine if the data is duplicate work, it should set *stop to NO. // In this case, the value of *isDuplicate is not examined. -typedef void (^MTRAsyncCallbackDuplicateCheckHandler)(id opaqueItemData, BOOL * isDuplicate, BOOL * stop); +typedef void (^MTRAsyncWorkDuplicateCheckHandler)(id opaqueItemData, BOOL * isDuplicate, BOOL * stop); -@interface MTRAsyncCallbackWorkQueue () +@interface MTRAsyncWorkQueue () // The MTRDevice object is only held and passed back as a reference and is opaque to the queue - (instancetype)initWithContext:(id _Nullable)context queue:(dispatch_queue_t)queue; @@ -82,21 +82,21 @@ typedef void (^MTRAsyncCallbackDuplicateCheckHandler)(id opaqueItemData, BOOL * - (BOOL)isDuplicateForTypeID:(NSUInteger)opaqueDuplicateTypeID workItemData:(id)opaqueWorkItemData; @end -@interface MTRAsyncCallbackQueueWorkItem () +@interface MTRAsyncWorkItem () // Batching @property (nonatomic, readonly) BOOL batchable; @property (nonatomic, readonly) NSUInteger batchingID; @property (nonatomic, readonly) id batchableData; -@property (nonatomic, readonly) MTRAsyncCallbackBatchingHandler batchingHandler; +@property (nonatomic, readonly) MTRAsyncWorkBatchingHandler batchingHandler; - (void)setBatchingID:(NSUInteger)opaqueBatchingID data:(id)opaqueBatchableData - handler:(MTRAsyncCallbackBatchingHandler)batchingHandler; + handler:(MTRAsyncWorkBatchingHandler)batchingHandler; // Duplicate check @property (nonatomic, readonly) BOOL supportsDuplicateCheck; @property (nonatomic, readonly) NSUInteger duplicateTypeID; -@property (nonatomic, readonly) MTRAsyncCallbackDuplicateCheckHandler duplicateCheckHandler; -- (void)setDuplicateTypeID:(NSUInteger)opaqueDuplicateTypeID handler:(MTRAsyncCallbackDuplicateCheckHandler)duplicateCheckHandler; +@property (nonatomic, readonly) MTRAsyncWorkDuplicateCheckHandler duplicateCheckHandler; +- (void)setDuplicateTypeID:(NSUInteger)opaqueDuplicateTypeID handler:(MTRAsyncWorkDuplicateCheckHandler)duplicateCheckHandler; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDefines_Internal.h b/src/darwin/Framework/CHIP/MTRDefines_Internal.h index f8a6a9329a5cc9..674d52f60fdb2c 100644 --- a/src/darwin/Framework/CHIP/MTRDefines_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDefines_Internal.h @@ -27,3 +27,9 @@ #else #define MTR_DIRECT_MEMBERS #endif + +#ifdef DEBUG +#define MTR_TESTABLE MTR_EXPORT +#else +#define MTR_TESTABLE MTR_HIDDEN +#endif diff --git a/src/darwin/Framework/CHIP/MTRDevice.h b/src/darwin/Framework/CHIP/MTRDevice.h index aadcb569d8f833..1241d21601e8b6 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.h +++ b/src/darwin/Framework/CHIP/MTRDevice.h @@ -22,7 +22,6 @@ NS_ASSUME_NONNULL_BEGIN @class MTRDeviceController; -@class MTRAsyncCallbackWorkQueue; typedef NS_ENUM(NSUInteger, MTRDeviceState) { MTRDeviceStateUnknown = 0, diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index ce68f134260bb1..a2f5f795389776 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -18,7 +18,7 @@ #import #import -#import "MTRAsyncCallbackWorkQueue_Internal.h" +#import "MTRAsyncWorkQueue_Internal.h" #import "MTRAttributeSpecifiedCheck.h" #import "MTRBaseDevice_Internal.h" #import "MTRBaseSubscriptionCallback.h" @@ -200,7 +200,7 @@ - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceControlle = dispatch_queue_create("org.csa-iot.matter.framework.device.workqueue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); _readCache = [NSMutableDictionary dictionary]; _expectedValueCache = [NSMutableDictionary dictionary]; - _asyncCallbackWorkQueue = [[MTRAsyncCallbackWorkQueue alloc] initWithContext:self queue:_queue]; + _asyncCallbackWorkQueue = [[MTRAsyncWorkQueue alloc] initWithContext:self queue:_queue]; _state = MTRDeviceStateUnknown; MTR_LOG_INFO("%@ init with hex nodeID 0x%016llX", self, _nodeID.unsignedLongLongValue); } @@ -869,8 +869,8 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) NSMutableArray * readRequests = [NSMutableArray arrayWithObject:readRequestData]; // Create work item, set ready handler to perform task, then enqueue the work - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.queue]; - MTRAsyncCallbackBatchingHandler batchingHandler = ^(id opaqueDataCurrent, id opaqueDataNext, BOOL * fullyMerged) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.queue]; + MTRAsyncWorkBatchingHandler batchingHandler = ^(id opaqueDataCurrent, id opaqueDataNext, BOOL * fullyMerged) { NSMutableArray * readRequestsCurrent = opaqueDataCurrent; NSMutableArray * readRequestsNext = opaqueDataNext; @@ -908,7 +908,7 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) *fullyMerged = YES; } }; - MTRAsyncCallbackDuplicateCheckHandler duplicateCheckHandler = ^(id opaqueItemData, BOOL * isDuplicate, BOOL * stop) { + MTRAsyncWorkDuplicateCheckHandler duplicateCheckHandler = ^(id opaqueItemData, BOOL * isDuplicate, BOOL * stop) { for (NSArray * readItem in readRequests) { if ([readItem isEqual:opaqueItemData]) { MTR_LOG_DEFAULT("%@ duplicate check found %@ - report duplicate", logPrefix, readItem); @@ -919,7 +919,7 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) } *stop = NO; }; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTR_LOG_DEFAULT("%@ dequeueWorkItem %@", logPrefix, self->_asyncCallbackWorkQueue); // Sanity check @@ -1000,14 +1000,14 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID expectedValueInterval:expectedValueInterval expectedValueID:&expectedValueID]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.queue]; + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.queue]; // The write operation will install a duplicate check handler, to return NO for "isDuplicate". Since a write operation may // change values, only read requests after this should be considered for duplicate requests. - MTRAsyncCallbackDuplicateCheckHandler duplicateCheckHandler = ^(id opaqueItemData, BOOL * isDuplicate, BOOL * stop) { + MTRAsyncWorkDuplicateCheckHandler duplicateCheckHandler = ^(id opaqueItemData, BOOL * isDuplicate, BOOL * stop) { *isDuplicate = NO; *stop = YES; }; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTR_LOG_DEFAULT("%@ dequeueWorkItem %@", logPrefix, self->_asyncCallbackWorkQueue); MTRBaseDevice * baseDevice = [self newBaseDevice]; [baseDevice @@ -1060,14 +1060,14 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID [attributePaths addObject:expectedValue[MTRAttributePathKey]]; } } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.queue]; + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.queue]; // The command operation will install a duplicate check handler, to return NO for "isDuplicate". Since a command operation may // change values, only read requests after this should be considered for duplicate requests. - MTRAsyncCallbackDuplicateCheckHandler duplicateCheckHandler = ^(id opaqueItemData, BOOL * isDuplicate, BOOL * stop) { + MTRAsyncWorkDuplicateCheckHandler duplicateCheckHandler = ^(id opaqueItemData, BOOL * isDuplicate, BOOL * stop) { *isDuplicate = NO; *stop = YES; }; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTR_LOG_DEFAULT("%@ dequeueWorkItem %@", logPrefix, self->_asyncCallbackWorkQueue); MTRBaseDevice * baseDevice = [self newBaseDevice]; [baseDevice diff --git a/src/darwin/Framework/CHIP/MTRDevice_Internal.h b/src/darwin/Framework/CHIP/MTRDevice_Internal.h index 8da4cecb60f7bd..7815fe2e5d44c2 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDevice_Internal.h @@ -16,14 +16,15 @@ */ #import - -#import "MTRBaseDevice.h" -#import "MTRDevice.h" +#import +#import #include NS_ASSUME_NONNULL_BEGIN +@class MTRAsyncWorkQueue; + typedef void (^MTRDevicePerformAsyncBlock)(MTRBaseDevice * baseDevice); @interface MTRDevice () @@ -47,7 +48,7 @@ typedef void (^MTRDevicePerformAsyncBlock)(MTRBaseDevice * baseDevice); // on work items should happen on this queue, so we don't block progress of the // asyncCallbackWorkQueue on any client code. @property (nonatomic) dispatch_queue_t queue; -@property (nonatomic, readonly) MTRAsyncCallbackWorkQueue * asyncCallbackWorkQueue; +@property (nonatomic, readonly) MTRAsyncWorkQueue * asyncCallbackWorkQueue; @end diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt index 6ae259be2877e2..a4afcd5c8bace0 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt @@ -3,7 +3,7 @@ #import #import -#import "MTRAsyncCallbackWorkQueue.h" +#import "MTRAsyncWorkQueue.h" #import "MTRBaseClusterUtils.h" #import "MTRBaseDevice_Internal.h" #import "MTRClusterConstants.h" @@ -28,11 +28,11 @@ using chip::Optional; using chip::System::Clock::Timeout; using chip::System::Clock::Seconds16; -static void MTRClustersLogEnqueue(NSString *logPrefix, MTRAsyncCallbackWorkQueue *workQueue) { +static void MTRClustersLogEnqueue(NSString *logPrefix, MTRAsyncWorkQueue *workQueue) { MTR_LOG_DEFAULT("%@ enqueueWorkItem %@", logPrefix, workQueue); } -static void MTRClustersLogDequeue(NSString *logPrefix, MTRAsyncCallbackWorkQueue *workQueue) { +static void MTRClustersLogDequeue(NSString *logPrefix, MTRAsyncWorkQueue *workQueue) { MTR_LOG_DEFAULT("%@ dequeueWorkItem %@", logPrefix, workQueue); } @@ -113,8 +113,8 @@ completionHandler NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int){{> clusterId}}, (unsigned int){{> commandId}}]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[{{> baseCluster}} alloc] initWithDevice:baseDevice endpointID:@(self.endpoint) queue:self.device.queue]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index b012fde1e2ee20..6588f0db6f4c79 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -18,7 +18,7 @@ #import #import -#import "MTRAsyncCallbackWorkQueue.h" +#import "MTRAsyncWorkQueue.h" #import "MTRBaseClusterUtils.h" #import "MTRBaseDevice_Internal.h" #import "MTRCallbackBridge.h" @@ -43,12 +43,12 @@ using chip::System::Clock::Seconds16; using chip::System::Clock::Timeout; -static void MTRClustersLogEnqueue(NSString * logPrefix, MTRAsyncCallbackWorkQueue * workQueue) +static void MTRClustersLogEnqueue(NSString * logPrefix, MTRAsyncWorkQueue * workQueue) { MTR_LOG_DEFAULT("%@ enqueueWorkItem %@", logPrefix, workQueue); } -static void MTRClustersLogDequeue(NSString * logPrefix, MTRAsyncCallbackWorkQueue * workQueue) +static void MTRClustersLogDequeue(NSString * logPrefix, MTRAsyncWorkQueue * workQueue) { MTR_LOG_DEFAULT("%@ dequeueWorkItem %@", logPrefix, workQueue); } @@ -86,8 +86,8 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params (unsigned int) MTRClusterIDTypeIdentifyID, (unsigned int) MTRCommandIDTypeClusterIdentifyCommandIdentifyID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:baseDevice @@ -126,8 +126,8 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params (unsigned int) MTRClusterIDTypeIdentifyID, (unsigned int) MTRCommandIDTypeClusterIdentifyCommandTriggerEffectID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:baseDevice @@ -294,8 +294,8 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandAddGroupID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice @@ -335,8 +335,8 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandViewGroupID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice @@ -376,8 +376,8 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandGetGroupMembershipID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice @@ -418,8 +418,8 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandRemoveGroupID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice @@ -467,8 +467,8 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandRemoveAllGroupsID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice @@ -507,8 +507,8 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa (unsigned int) MTRCommandIDTypeClusterGroupsCommandAddGroupIfIdentifyingID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice @@ -714,8 +714,8 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandAddSceneID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice @@ -755,8 +755,8 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandViewSceneID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice @@ -796,8 +796,8 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRemoveSceneID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice @@ -837,8 +837,8 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRemoveAllScenesID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice @@ -879,8 +879,8 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandStoreSceneID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice @@ -919,8 +919,8 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRecallSceneID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice @@ -960,8 +960,8 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandGetSceneMembershipID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice @@ -1002,8 +1002,8 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandEnhancedAddSceneID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice @@ -1044,8 +1044,8 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandEnhancedViewSceneID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice @@ -1086,8 +1086,8 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandCopySceneID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice @@ -1407,8 +1407,8 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOffID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice @@ -1453,8 +1453,8 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice @@ -1499,8 +1499,8 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandToggleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice @@ -1539,8 +1539,8 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOffWithEffectID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice @@ -1588,8 +1588,8 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnWithRecallGlobalSceneID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice @@ -1628,8 +1628,8 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnWithTimedOffID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice @@ -2044,8 +2044,8 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToLevelID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice @@ -2084,8 +2084,8 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice @@ -2124,8 +2124,8 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStepID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice @@ -2164,8 +2164,8 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice @@ -2204,8 +2204,8 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToLevelWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice @@ -2244,8 +2244,8 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice @@ -2284,8 +2284,8 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStepWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice @@ -2324,8 +2324,8 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStopWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice @@ -2364,8 +2364,8 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToClosestFrequencyID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice @@ -3520,8 +3520,8 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandInstantActionID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -3560,8 +3560,8 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit (unsigned int) MTRCommandIDTypeClusterActionsCommandInstantActionWithTransitionID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -3600,8 +3600,8 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandStartActionID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -3640,8 +3640,8 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat (unsigned int) MTRCommandIDTypeClusterActionsCommandStartActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -3680,8 +3680,8 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandStopActionID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -3720,8 +3720,8 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandPauseActionID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -3760,8 +3760,8 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat (unsigned int) MTRCommandIDTypeClusterActionsCommandPauseActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -3800,8 +3800,8 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandResumeActionID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -3840,8 +3840,8 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandEnableActionID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -3880,8 +3880,8 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur (unsigned int) MTRCommandIDTypeClusterActionsCommandEnableActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -3920,8 +3920,8 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandDisableActionID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -3960,8 +3960,8 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD (unsigned int) MTRCommandIDTypeClusterActionsCommandDisableActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice @@ -4225,8 +4225,8 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla self.endpoint, (unsigned int) 0x00000028, (unsigned int) 0x10020000]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:baseDevice @@ -4585,8 +4585,8 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandQueryImageID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice @@ -4627,8 +4627,8 @@ - (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUp (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandApplyUpdateRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice @@ -4668,8 +4668,8 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandNotifyUpdateAppliedID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice @@ -4826,8 +4826,8 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateRequestorCommandAnnounceOTAProviderID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:baseDevice @@ -5783,8 +5783,8 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandArmFailSafeID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice @@ -5825,8 +5825,8 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandSetRegulatoryConfigID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice @@ -5880,8 +5880,8 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandCommissioningCompleteID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice @@ -6117,8 +6117,8 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandScanNetworksID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice @@ -6159,8 +6159,8 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandAddOrUpdateWiFiNetworkID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice @@ -6201,8 +6201,8 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandAddOrUpdateThreadNetworkID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice @@ -6243,8 +6243,8 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandRemoveNetworkID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice @@ -6285,8 +6285,8 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandConnectNetworkID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice @@ -6327,8 +6327,8 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandReorderNetworkID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice @@ -6619,8 +6619,8 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque (unsigned int) MTRCommandIDTypeClusterDiagnosticLogsCommandRetrieveLogsRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:baseDevice @@ -6748,8 +6748,8 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger (unsigned int) MTRCommandIDTypeClusterGeneralDiagnosticsCommandTestEventTriggerID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:baseDevice @@ -6957,8 +6957,8 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP (unsigned int) MTRCommandIDTypeClusterSoftwareDiagnosticsCommandResetWatermarksID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:baseDevice @@ -7131,8 +7131,8 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara (unsigned int) MTRCommandIDTypeClusterThreadNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:baseDevice @@ -7802,8 +7802,8 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams (unsigned int) MTRCommandIDTypeClusterWiFiNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:baseDevice @@ -8060,8 +8060,8 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa (unsigned int) MTRCommandIDTypeClusterEthernetNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:baseDevice @@ -8266,8 +8266,8 @@ - (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)pa (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetUTCTimeID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice @@ -8306,8 +8306,8 @@ - (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedT (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetTrustedTimeSourceID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice @@ -8347,8 +8347,8 @@ - (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *) (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetTimeZoneID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice @@ -8388,8 +8388,8 @@ - (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetDSTOffsetID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice @@ -8428,8 +8428,8 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetDefaultNTPID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice @@ -8966,8 +8966,8 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandOpenCommissioningWindowID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice @@ -9007,8 +9007,8 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandOpenBasicCommissioningWindowID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice @@ -9056,8 +9056,8 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandRevokeCommissioningID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice @@ -9236,8 +9236,8 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAttestationRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice @@ -9278,8 +9278,8 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandCertificateChainRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice @@ -9321,8 +9321,8 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandCSRRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice @@ -9363,8 +9363,8 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAddNOCID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice @@ -9405,8 +9405,8 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandUpdateNOCID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice @@ -9447,8 +9447,8 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandUpdateFabricLabelID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice @@ -9489,8 +9489,8 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandRemoveFabricID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice @@ -9531,8 +9531,8 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAddTrustedRootCertificateID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice @@ -9808,8 +9808,8 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetWriteID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice @@ -9849,8 +9849,8 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice @@ -9890,8 +9890,8 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetRemoveID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice @@ -9942,8 +9942,8 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice @@ -10420,8 +10420,8 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) (unsigned int) MTRCommandIDTypeClusterICDManagementCommandRegisterClientID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice @@ -10461,8 +10461,8 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam (unsigned int) MTRCommandIDTypeClusterICDManagementCommandUnregisterClientID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice @@ -10510,8 +10510,8 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar (unsigned int) MTRCommandIDTypeClusterICDManagementCommandStayActiveRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice @@ -10662,8 +10662,8 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params (unsigned int) MTRCommandIDTypeClusterModeSelectCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:baseDevice @@ -10872,8 +10872,8 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) (unsigned int) MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:baseDevice @@ -11051,8 +11051,8 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo (unsigned int) MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:baseDevice @@ -11383,8 +11383,8 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params (unsigned int) MTRCommandIDTypeClusterRVCRunModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:baseDevice @@ -11559,8 +11559,8 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param (unsigned int) MTRCommandIDTypeClusterRVCCleanModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:baseDevice @@ -11734,8 +11734,8 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara (unsigned int) MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:baseDevice @@ -11977,8 +11977,8 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par (unsigned int) MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:baseDevice @@ -12233,8 +12233,8 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * (unsigned int) MTRCommandIDTypeClusterSmokeCOAlarmCommandSelfTestRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:baseDevice @@ -12462,8 +12462,8 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params (unsigned int) MTRCommandIDTypeClusterDishwasherAlarmCommandResetID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:baseDevice @@ -12502,8 +12502,8 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla (unsigned int) MTRCommandIDTypeClusterDishwasherAlarmCommandModifyEnabledAlarmsID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:baseDevice @@ -12646,8 +12646,8 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice @@ -12695,8 +12695,8 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice @@ -12744,8 +12744,8 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandStartID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice @@ -12793,8 +12793,8 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandResumeID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice @@ -12954,8 +12954,8 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice @@ -13003,8 +13003,8 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice @@ -13052,8 +13052,8 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandStartID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice @@ -13101,8 +13101,8 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandResumeID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice @@ -13263,8 +13263,8 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa (unsigned int) MTRCommandIDTypeClusterHEPAFilterMonitoringCommandResetConditionID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:baseDevice @@ -13444,8 +13444,8 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset (unsigned int) MTRCommandIDTypeClusterActivatedCarbonFilterMonitoringCommandResetConditionID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:baseDevice @@ -13624,8 +13624,8 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandLockDoorID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -13664,8 +13664,8 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockDoorID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -13704,8 +13704,8 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockWithTimeoutID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -13744,8 +13744,8 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -13785,8 +13785,8 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -13826,8 +13826,8 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -13866,8 +13866,8 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -13907,8 +13907,8 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -13948,8 +13948,8 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -13988,8 +13988,8 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -14029,8 +14029,8 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -14070,8 +14070,8 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -14110,8 +14110,8 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetUserID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -14150,8 +14150,8 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetUserID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -14190,8 +14190,8 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearUserID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -14231,8 +14231,8 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetCredentialID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -14273,8 +14273,8 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -14314,8 +14314,8 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearCredentialID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -14354,8 +14354,8 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnboltDoorID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice @@ -15328,8 +15328,8 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandUpOrOpenID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice @@ -15377,8 +15377,8 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandDownOrCloseID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice @@ -15426,8 +15426,8 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandStopMotionID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice @@ -15466,8 +15466,8 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToLiftValueID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice @@ -15506,8 +15506,8 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToLiftPercentageID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice @@ -15546,8 +15546,8 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltValueID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice @@ -15586,8 +15586,8 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltPercentageID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice @@ -15997,8 +15997,8 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont (unsigned int) MTRCommandIDTypeClusterBarrierControlCommandBarrierControlGoToPercentID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:baseDevice @@ -16046,8 +16046,8 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop (unsigned int) MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:baseDevice @@ -16733,8 +16733,8 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara (unsigned int) MTRCommandIDTypeClusterThermostatCommandSetpointRaiseLowerID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice @@ -16773,8 +16773,8 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams (unsigned int) MTRCommandIDTypeClusterThermostatCommandSetWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice @@ -16814,8 +16814,8 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams (unsigned int) MTRCommandIDTypeClusterThermostatCommandGetWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice @@ -16864,8 +16864,8 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa (unsigned int) MTRCommandIDTypeClusterThermostatCommandClearWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice @@ -17957,8 +17957,8 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params (unsigned int) MTRClusterIDTypeFanControlID, (unsigned int) MTRCommandIDTypeClusterFanControlCommandStepID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:baseDevice @@ -18473,8 +18473,8 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToHueID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18513,8 +18513,8 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveHueID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18553,8 +18553,8 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepHueID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18593,8 +18593,8 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToSaturationID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18633,8 +18633,8 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveSaturationID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18673,8 +18673,8 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepSaturationID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18713,8 +18713,8 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToHueAndSaturationID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18753,8 +18753,8 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToColorID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18793,8 +18793,8 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveColorID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18833,8 +18833,8 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepColorID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18873,8 +18873,8 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18913,8 +18913,8 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveToHueID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18953,8 +18953,8 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveHueID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -18993,8 +18993,8 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedStepHueID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -19033,8 +19033,8 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveToHueAndSaturationID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -19073,8 +19073,8 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param (unsigned int) MTRCommandIDTypeClusterColorControlCommandColorLoopSetID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -19113,8 +19113,8 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param (unsigned int) MTRCommandIDTypeClusterColorControlCommandStopMoveStepID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -19153,8 +19153,8 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -19193,8 +19193,8 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice @@ -23350,8 +23350,8 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params (unsigned int) MTRClusterIDTypeChannelID, (unsigned int) MTRCommandIDTypeClusterChannelCommandChangeChannelID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice @@ -23391,8 +23391,8 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP (unsigned int) MTRCommandIDTypeClusterChannelCommandChangeChannelByNumberID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice @@ -23431,8 +23431,8 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params (unsigned int) MTRClusterIDTypeChannelID, (unsigned int) MTRCommandIDTypeClusterChannelCommandSkipChannelID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice @@ -23603,8 +23603,8 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams (unsigned int) MTRCommandIDTypeClusterTargetNavigatorCommandNavigateTargetID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:baseDevice @@ -23756,8 +23756,8 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPlayID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice @@ -23804,8 +23804,8 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice @@ -23852,8 +23852,8 @@ - (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice @@ -23903,8 +23903,8 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandStartOverID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice @@ -23951,8 +23951,8 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPreviousID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice @@ -23999,8 +23999,8 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandNextID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice @@ -24047,8 +24047,8 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandRewindID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice @@ -24098,8 +24098,8 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandFastForwardID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice @@ -24140,8 +24140,8 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSkipForwardID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice @@ -24182,8 +24182,8 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSkipBackwardID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice @@ -24224,8 +24224,8 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSeekID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice @@ -24627,8 +24627,8 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params (unsigned int) MTRCommandIDTypeClusterMediaInputCommandSelectInputID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice @@ -24676,8 +24676,8 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ (unsigned int) MTRCommandIDTypeClusterMediaInputCommandShowInputStatusID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice @@ -24725,8 +24725,8 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ (unsigned int) MTRCommandIDTypeClusterMediaInputCommandHideInputStatusID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice @@ -24765,8 +24765,8 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params (unsigned int) MTRCommandIDTypeClusterMediaInputCommandRenameInputID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice @@ -24958,8 +24958,8 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params (unsigned int) MTRClusterIDTypeLowPowerID, (unsigned int) MTRCommandIDTypeClusterLowPowerCommandSleepID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:baseDevice @@ -25091,8 +25091,8 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params (unsigned int) MTRClusterIDTypeKeypadInputID, (unsigned int) MTRCommandIDTypeClusterKeypadInputCommandSendKeyID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:baseDevice @@ -25219,8 +25219,8 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) (unsigned int) MTRCommandIDTypeClusterContentLauncherCommandLaunchContentID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:baseDevice @@ -25261,8 +25261,8 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params (unsigned int) MTRCommandIDTypeClusterContentLauncherCommandLaunchURLID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:baseDevice @@ -25441,8 +25441,8 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params (unsigned int) MTRCommandIDTypeClusterAudioOutputCommandSelectOutputID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:baseDevice @@ -25481,8 +25481,8 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params (unsigned int) MTRCommandIDTypeClusterAudioOutputCommandRenameOutputID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:baseDevice @@ -25631,8 +25631,8 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nul (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandLaunchAppID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice @@ -25673,8 +25673,8 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullabl (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandStopAppID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice @@ -25715,8 +25715,8 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandHideAppID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice @@ -26044,8 +26044,8 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandGetSetupPINID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice @@ -26085,8 +26085,8 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params (unsigned int) MTRClusterIDTypeAccountLoginID, (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandLoginID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice @@ -26131,8 +26131,8 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params (unsigned int) MTRClusterIDTypeAccountLoginID, (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandLogoutID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice @@ -26296,8 +26296,8 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi (unsigned int) MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoCommandID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:baseDevice @@ -26337,8 +26337,8 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG (unsigned int) MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:baseDevice @@ -27722,8 +27722,8 @@ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -27771,8 +27771,8 @@ - (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _N (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNotHandledID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -27822,8 +27822,8 @@ - (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nulla (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSpecificID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -27872,8 +27872,8 @@ - (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandPar (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestUnknownCommandID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -27913,8 +27913,8 @@ - (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestAddArgumentsID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -27955,8 +27955,8 @@ - (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgu (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSimpleArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -27998,8 +27998,8 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestStructArrayArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28041,8 +28041,8 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28083,8 +28083,8 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNestedStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28125,8 +28125,8 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28167,8 +28167,8 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListInt8UArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28209,8 +28209,8 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNestedStructListArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28253,8 +28253,8 @@ - (void)testListNestedStructListArgumentRequestWithParams: (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListNestedStructListArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28295,8 +28295,8 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListInt8UReverseRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28337,8 +28337,8 @@ - (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEnumsRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28379,8 +28379,8 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNullableOptionalRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28423,8 +28423,8 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestComplexNullableOptionalRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28467,8 +28467,8 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandSimpleStructEchoRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28517,8 +28517,8 @@ - (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestPar (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTimedInvokeRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28557,8 +28557,8 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSimpleOptionalArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28598,8 +28598,8 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEmitTestEventRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -28644,8 +28644,8 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEmitTestFabricScopedEventRequestID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice @@ -31377,8 +31377,8 @@ - (void)pingWithParams:(MTRSampleMEIClusterPingParams * _Nullable)params (unsigned int) MTRClusterIDTypeSampleMEIID, (unsigned int) MTRCommandIDTypeClusterSampleMEICommandPingID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterSampleMEI alloc] initWithDevice:baseDevice @@ -31418,8 +31418,8 @@ - (void)addArgumentsWithParams:(MTRSampleMEIClusterAddArgumentsParams *)params (unsigned int) MTRClusterIDTypeSampleMEIID, (unsigned int) MTRCommandIDTypeClusterSampleMEICommandAddArgumentsID]; // Make a copy of params before we go async. params = [params copy]; - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; auto * cluster = [[MTRBaseClusterSampleMEI alloc] initWithDevice:baseDevice diff --git a/src/darwin/Framework/CHIPTests/MTRAsyncCallbackQueueTests.m b/src/darwin/Framework/CHIPTests/MTRAsyncCallbackQueueTests.m index 01651afa5a1edb..bf8041ccd10fbc 100644 --- a/src/darwin/Framework/CHIPTests/MTRAsyncCallbackQueueTests.m +++ b/src/darwin/Framework/CHIPTests/MTRAsyncCallbackQueueTests.m @@ -19,8 +19,6 @@ // system dependencies #import -#import "MTRAsyncCallbackWorkQueue_Internal.h" - @interface MTRAsyncCallbackQueueTests : XCTestCase @end @@ -256,219 +254,4 @@ - (void)testInvalidation [self waitForExpectations:@[ expectation, cancelExpectation ] timeout:5]; } -- (void)testBatching -{ - XCTestExpectation * workItem1ReadyExpectation = [self expectationWithDescription:@"Work item 1 called"]; - __block BOOL workItem2BatchingCalled = NO; - __block BOOL workItem2ReadyCalled = NO; - XCTestExpectation * workItem3ReadyExpectation = [self expectationWithDescription:@"Work item 3 called"]; - - MTRAsyncCallbackWorkQueue * workQueue = [[MTRAsyncCallbackWorkQueue alloc] initWithContext:nil queue:dispatch_get_main_queue()]; - - // Have a work item sleep so the testing items can queue - MTRAsyncCallbackQueueWorkItem * workItem0 = - [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; - MTRAsyncCallbackReadyHandler readyHandler0 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { - // While processing item 0, enqueue additional items to test batching - MTRAsyncCallbackQueueWorkItem * workItem1 = - [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; - MTRAsyncCallbackReadyHandler readyHandler1 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { - [workItem1ReadyExpectation fulfill]; - [workItem1 endWork]; - }; - workItem1.readyHandler = readyHandler1; - [workItem1 setBatchingID:1 - data:@(1) - handler:^(id _Nonnull opaqueDataFirst, id _Nonnull opaqueDataSecond, BOOL * _Nonnull fullyMerged) { - XCTAssertEqualObjects(opaqueDataFirst, @(1)); - XCTAssertEqualObjects(opaqueDataSecond, @(2)); - *fullyMerged = YES; - }]; - // No cancel handler on purpose. - [workQueue enqueueWorkItem:workItem1]; - - MTRAsyncCallbackQueueWorkItem * workItem2 = - [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; - MTRAsyncCallbackReadyHandler readyHandler2 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { - workItem2ReadyCalled = YES; - [workItem2 endWork]; - }; - workItem2.readyHandler = readyHandler2; - [workItem2 setBatchingID:1 - data:@(2) - handler:^(id _Nonnull opaqueDataFirst, id _Nonnull opaqueDataSecond, BOOL * _Nonnull fullyMerged) { - workItem2BatchingCalled = YES; - }]; - // No cancel handler on purpose. - [workQueue enqueueWorkItem:workItem2]; - - MTRAsyncCallbackQueueWorkItem * workItem3 = - [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; - MTRAsyncCallbackReadyHandler readyHandler3 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { - [workItem3ReadyExpectation fulfill]; - [workItem3 endWork]; - }; - workItem3.readyHandler = readyHandler3; - [workQueue enqueueWorkItem:workItem3]; - - [workItem0 endWork]; - }; - workItem0.readyHandler = readyHandler0; - // No cancel handler on purpose. - [workQueue enqueueWorkItem:workItem0]; - - [self waitForExpectations:@[ workItem1ReadyExpectation, workItem3ReadyExpectation ] timeout:5]; - - XCTAssertFalse(workItem2BatchingCalled); - XCTAssertFalse(workItem2ReadyCalled); -} - -- (void)testDuplicate -{ - XCTestExpectation * workItem0ReadyExpectation = [self expectationWithDescription:@"Work item 0 called"]; - XCTestExpectation * workItem6ReadyExpectation = [self expectationWithDescription:@"Work item 6 called"]; - - MTRAsyncCallbackWorkQueue * workQueue = [[MTRAsyncCallbackWorkQueue alloc] initWithContext:nil queue:dispatch_get_main_queue()]; - - // Have a work item sleep so the testing items can queue - MTRAsyncCallbackQueueWorkItem * workItem0 = - [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; - MTRAsyncCallbackReadyHandler readyHandler0 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { - // While processing item 0, enqueue additional items to test duplicate checking - MTRAsyncCallbackQueueWorkItem * workItem1 = - [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; - MTRAsyncCallbackReadyHandler readyHandler1 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { - [workItem1 endWork]; - }; - workItem1.readyHandler = readyHandler1; - [workItem1 setDuplicateTypeID:1 - handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { - if ([opaqueItemData isEqual:@(1)]) { - *isDuplicate = YES; - *stop = YES; - } else { - *stop = NO; - } - }]; - [workQueue enqueueWorkItem:workItem1]; - - MTRAsyncCallbackQueueWorkItem * workItem2 = - [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; - MTRAsyncCallbackReadyHandler readyHandler2 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { - [workItem2 endWork]; - }; - workItem2.readyHandler = readyHandler2; - [workItem2 setDuplicateTypeID:1 - handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { - if ([opaqueItemData isEqual:@(2)]) { - *isDuplicate = YES; - *stop = YES; - } else { - *stop = NO; - } - }]; - [workQueue enqueueWorkItem:workItem2]; - - MTRAsyncCallbackQueueWorkItem * workItem3 = - [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; - MTRAsyncCallbackReadyHandler readyHandler3 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { - [workItem3 endWork]; - }; - workItem3.readyHandler = readyHandler3; - [workItem3 setDuplicateTypeID:2 - handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { - if ([opaqueItemData isEqual:@(1)]) { - *isDuplicate = YES; - *stop = YES; - } else { - *stop = NO; - } - }]; - [workQueue enqueueWorkItem:workItem3]; - - // At this point we should have duplicate type 1 with data @(1) and @(2), and type 2 with data @(1). - XCTAssertTrue([workQueue isDuplicateForTypeID:1 workItemData:@(1)]); - XCTAssertTrue([workQueue isDuplicateForTypeID:1 workItemData:@(2)]); - XCTAssertTrue([workQueue isDuplicateForTypeID:2 workItemData:@(1)]); - - XCTAssertFalse([workQueue isDuplicateForTypeID:0 workItemData:@(1)]); - XCTAssertFalse([workQueue isDuplicateForTypeID:0 workItemData:@(2)]); - XCTAssertFalse([workQueue isDuplicateForTypeID:1 workItemData:@(0)]); - XCTAssertFalse([workQueue isDuplicateForTypeID:1 workItemData:@(3)]); - XCTAssertFalse([workQueue isDuplicateForTypeID:2 workItemData:@(2)]); - - // Test returning *isDuplicate=NO and queuing one extra duplicate item, and that the extra item runs - - // First have a regular item with ID/data == 3/1 - MTRAsyncCallbackQueueWorkItem * workItem4 = - [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; - MTRAsyncCallbackReadyHandler readyHandler4 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { - [workItem4 endWork]; - }; - workItem4.readyHandler = readyHandler4; - [workItem4 setDuplicateTypeID:3 - handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { - if ([opaqueItemData isEqual:@(1)]) { - *isDuplicate = YES; - *stop = YES; - } else { - *stop = NO; - } - }]; - [workQueue enqueueWorkItem:workItem4]; - - XCTAssertTrue([workQueue isDuplicateForTypeID:3 workItemData:@(1)]); - - // Have a barrier item with ID/data == 3/1 that returns *isDuplicate=NO - MTRAsyncCallbackQueueWorkItem * workItem5 = - [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; - MTRAsyncCallbackReadyHandler readyHandler5 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { - [workItem5 endWork]; - }; - workItem5.readyHandler = readyHandler5; - [workItem5 setDuplicateTypeID:3 - handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { - if ([opaqueItemData isEqual:@(1)]) { - *isDuplicate = NO; - *stop = YES; - } else { - *stop = NO; - } - }]; - [workQueue enqueueWorkItem:workItem5]; - - // After the above, the same ID/data should no longer be considered duplicate - XCTAssertFalse([workQueue isDuplicateForTypeID:3 workItemData:@(1)]); - - // Now add regular regular item with ID/data == 3/1 - MTRAsyncCallbackQueueWorkItem * workItem6 = - [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; - MTRAsyncCallbackReadyHandler readyHandler6 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { - [workItem6 endWork]; - [workItem6ReadyExpectation fulfill]; - }; - workItem6.readyHandler = readyHandler6; - [workItem6 setDuplicateTypeID:3 - handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { - if ([opaqueItemData isEqual:@(1)]) { - *isDuplicate = YES; - *stop = YES; - } else { - *stop = NO; - } - }]; - [workQueue enqueueWorkItem:workItem6]; - - // After the above, the same ID/data should no longer be considered duplicate - XCTAssertTrue([workQueue isDuplicateForTypeID:3 workItemData:@(1)]); - - [workItem0 endWork]; - [workItem0ReadyExpectation fulfill]; - }; - workItem0.readyHandler = readyHandler0; - [workQueue enqueueWorkItem:workItem0]; - - [self waitForExpectations:@[ workItem0ReadyExpectation, workItem6ReadyExpectation ] timeout:5]; -} - @end diff --git a/src/darwin/Framework/CHIPTests/MTRAsyncWorkQueueTests.m b/src/darwin/Framework/CHIPTests/MTRAsyncWorkQueueTests.m new file mode 100644 index 00000000000000..4fbb1c44468652 --- /dev/null +++ b/src/darwin/Framework/CHIPTests/MTRAsyncWorkQueueTests.m @@ -0,0 +1,451 @@ +/** + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +// system dependencies +#import + +#import "MTRAsyncWorkQueue_Internal.h" + +@interface MTRAsyncWorkQueueTests : XCTestCase + +@end + +@implementation MTRAsyncWorkQueueTests + +- (void)testRunItem +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Work item called"]; + + MTRAsyncWorkQueue * workQueue = [[MTRAsyncWorkQueue alloc] initWithContext:nil queue:dispatch_get_main_queue()]; + + MTRAsyncWorkItem * workItem1 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + __block int counter = 0; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + counter++; + [expectation fulfill]; + [workItem1 endWork]; + }; + workItem1.readyHandler = readyHandler; + workItem1.cancelHandler = ^{ + }; + [workQueue enqueueWorkItem:workItem1]; + + // Check for leaks. + MTRAsyncWorkItem * __weak weakItem = workItem1; + [self addTeardownBlock:^() { + XCTAssertNil(weakItem); + }]; + + [self waitForExpectationsWithTimeout:5 handler:nil]; + + // see that it only ran once + XCTAssertEqual(counter, 1); +} + +- (void)testRunItemsSerialized +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Work item called in order"]; + + MTRAsyncWorkQueue * workQueue = [[MTRAsyncWorkQueue alloc] initWithContext:nil queue:dispatch_get_main_queue()]; + + MTRAsyncWorkItem * workItem1 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + __block int counter = 0; + MTRAsyncWorkReadyHandler readyHandler1 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + sleep(1); + counter++; + [workItem1 endWork]; + }; + workItem1.readyHandler = readyHandler1; + workItem1.cancelHandler = ^{ + }; + [workQueue enqueueWorkItem:workItem1]; + + MTRAsyncWorkItem * workItem2 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler2 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + // expect this to have waited until workItem1's sleep(1) finished and incremented counter + if (counter == 1) { + [expectation fulfill]; + } + [workItem2 endWork]; + }; + workItem2.readyHandler = readyHandler2; + workItem2.cancelHandler = ^{ + }; + [workQueue enqueueWorkItem:workItem2]; + + [self waitForExpectationsWithTimeout:5 handler:nil]; + + // see that workItem1 only ran once + XCTAssertEqual(counter, 1); +} + +- (void)testRunItemsRetry +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Work item called in order"]; + + MTRAsyncWorkQueue * workQueue = [[MTRAsyncWorkQueue alloc] initWithContext:nil queue:dispatch_get_main_queue()]; + + MTRAsyncWorkItem * workItem1 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + __block int counter = 0; + MTRAsyncWorkReadyHandler readyHandler1 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + sleep(1); + counter++; + + if (retryCount) { + // only end after retried once + [workItem1 endWork]; + } else { + [workItem1 retryWork]; + } + }; + workItem1.readyHandler = readyHandler1; + workItem1.cancelHandler = ^{ + }; + [workQueue enqueueWorkItem:workItem1]; + + MTRAsyncWorkItem * workItem2 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler2 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + // expect this to have waited until workItem1's sleep(1) finished and incremented counter twice + if (counter == 2) { + [expectation fulfill]; + } + [workItem2 endWork]; + }; + workItem2.readyHandler = readyHandler2; + workItem2.cancelHandler = ^{ + }; + [workQueue enqueueWorkItem:workItem2]; + + [self waitForExpectationsWithTimeout:5 handler:nil]; + + // see that workItem1 ran twice after the retry + XCTAssertEqual(counter, 2); +} + +- (void)testRunItemsAfterDrain +{ + XCTestExpectation * expectation1 = [self expectationWithDescription:@"First work item caled"]; + XCTestExpectation * expectation2 = [self expectationWithDescription:@"Second work item called after drain"]; + + MTRAsyncWorkQueue * workQueue = [[MTRAsyncWorkQueue alloc] initWithContext:nil queue:dispatch_get_main_queue()]; + + MTRAsyncWorkItem * workItem1 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler1 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + [workItem1 endWork]; + [expectation1 fulfill]; + }; + workItem1.readyHandler = readyHandler1; + workItem1.cancelHandler = ^{ + }; + [workQueue enqueueWorkItem:workItem1]; + + [self waitForExpectations:@[ expectation1 ] timeout:5]; + + MTRAsyncWorkItem * workItem2 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler2 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + [expectation2 fulfill]; + [workItem2 endWork]; + }; + workItem2.readyHandler = readyHandler2; + workItem2.cancelHandler = ^{ + }; + [workQueue enqueueWorkItem:workItem2]; + + [self waitForExpectationsWithTimeout:5 handler:nil]; +} + +- (void)testRunItemNoHandlers +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Work item called"]; + + MTRAsyncWorkQueue * workQueue = [[MTRAsyncWorkQueue alloc] initWithContext:nil queue:dispatch_get_main_queue()]; + + MTRAsyncWorkItem * workItem1 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkItem * workItem2 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + + __block int counter = 0; + MTRAsyncWorkReadyHandler readyHandler = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + counter++; + [workItem2 endWork]; + [expectation fulfill]; + }; + workItem2.readyHandler = readyHandler; + workItem2.cancelHandler = ^{ + }; + + // Check that trying to run workItem1 does not crash. + [workQueue enqueueWorkItem:workItem1]; + [workQueue enqueueWorkItem:workItem2]; + + [self waitForExpectationsWithTimeout:5 handler:nil]; + + // see that it only ran once + XCTAssertEqual(counter, 1); +} + +- (void)testInvalidation +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Work item called"]; + XCTestExpectation * cancelExpectation = [self expectationWithDescription:@"Work item canceled"]; + + MTRAsyncWorkQueue * workQueue = [[MTRAsyncWorkQueue alloc] initWithContext:nil queue:dispatch_get_main_queue()]; + + MTRAsyncWorkItem * workItem1 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler1 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + // Give the code enqueing the other items a chance to run, so they can + // actually get canceled. + sleep(1); + [workQueue invalidate]; + [workItem1 endWork]; + [expectation fulfill]; + }; + workItem1.readyHandler = readyHandler1; + // No cancel handler on purpose. + [workQueue enqueueWorkItem:workItem1]; + + MTRAsyncWorkItem * workItem2 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler2 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + // This should never get called. + XCTAssertFalse(YES); + [workItem2 endWork]; + }; + workItem2.readyHandler = readyHandler2; + // No cancel handler on purpose. + [workQueue enqueueWorkItem:workItem2]; + + MTRAsyncWorkItem * workItem3 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler3 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + // This should never get called. + XCTAssertFalse(YES); + [workItem3 endWork]; + }; + dispatch_block_t cancelHandler3 = ^() { + [cancelExpectation fulfill]; + }; + workItem3.readyHandler = readyHandler3; + workItem3.cancelHandler = cancelHandler3; + [workQueue enqueueWorkItem:workItem3]; + + [self waitForExpectations:@[ expectation, cancelExpectation ] timeout:5]; +} + +- (void)testBatching +{ + XCTestExpectation * workItem1ReadyExpectation = [self expectationWithDescription:@"Work item 1 called"]; + __block BOOL workItem2BatchingCalled = NO; + __block BOOL workItem2ReadyCalled = NO; + XCTestExpectation * workItem3ReadyExpectation = [self expectationWithDescription:@"Work item 3 called"]; + + MTRAsyncWorkQueue * workQueue = [[MTRAsyncWorkQueue alloc] initWithContext:nil queue:dispatch_get_main_queue()]; + + // Have a work item sleep so the testing items can queue + MTRAsyncWorkItem * workItem0 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler0 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + // While processing item 0, enqueue additional items to test batching + MTRAsyncWorkItem * workItem1 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler1 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + [workItem1ReadyExpectation fulfill]; + [workItem1 endWork]; + }; + workItem1.readyHandler = readyHandler1; + [workItem1 setBatchingID:1 + data:@(1) + handler:^(id _Nonnull opaqueDataFirst, id _Nonnull opaqueDataSecond, BOOL * _Nonnull fullyMerged) { + XCTAssertEqualObjects(opaqueDataFirst, @(1)); + XCTAssertEqualObjects(opaqueDataSecond, @(2)); + *fullyMerged = YES; + }]; + // No cancel handler on purpose. + [workQueue enqueueWorkItem:workItem1]; + + MTRAsyncWorkItem * workItem2 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler2 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + workItem2ReadyCalled = YES; + [workItem2 endWork]; + }; + workItem2.readyHandler = readyHandler2; + [workItem2 setBatchingID:1 + data:@(2) + handler:^(id _Nonnull opaqueDataFirst, id _Nonnull opaqueDataSecond, BOOL * _Nonnull fullyMerged) { + workItem2BatchingCalled = YES; + }]; + // No cancel handler on purpose. + [workQueue enqueueWorkItem:workItem2]; + + MTRAsyncWorkItem * workItem3 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler3 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + [workItem3ReadyExpectation fulfill]; + [workItem3 endWork]; + }; + workItem3.readyHandler = readyHandler3; + [workQueue enqueueWorkItem:workItem3]; + + [workItem0 endWork]; + }; + workItem0.readyHandler = readyHandler0; + // No cancel handler on purpose. + [workQueue enqueueWorkItem:workItem0]; + + [self waitForExpectations:@[ workItem1ReadyExpectation, workItem3ReadyExpectation ] timeout:5]; + + XCTAssertFalse(workItem2BatchingCalled); + XCTAssertFalse(workItem2ReadyCalled); +} + +- (void)testDuplicate +{ + XCTestExpectation * workItem0ReadyExpectation = [self expectationWithDescription:@"Work item 0 called"]; + XCTestExpectation * workItem6ReadyExpectation = [self expectationWithDescription:@"Work item 6 called"]; + + MTRAsyncWorkQueue * workQueue = [[MTRAsyncWorkQueue alloc] initWithContext:nil queue:dispatch_get_main_queue()]; + + // Have a work item sleep so the testing items can queue + MTRAsyncWorkItem * workItem0 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler0 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + // While processing item 0, enqueue additional items to test duplicate checking + MTRAsyncWorkItem * workItem1 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler1 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + [workItem1 endWork]; + }; + workItem1.readyHandler = readyHandler1; + [workItem1 setDuplicateTypeID:1 + handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { + if ([opaqueItemData isEqual:@(1)]) { + *isDuplicate = YES; + *stop = YES; + } else { + *stop = NO; + } + }]; + [workQueue enqueueWorkItem:workItem1]; + + MTRAsyncWorkItem * workItem2 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler2 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + [workItem2 endWork]; + }; + workItem2.readyHandler = readyHandler2; + [workItem2 setDuplicateTypeID:1 + handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { + if ([opaqueItemData isEqual:@(2)]) { + *isDuplicate = YES; + *stop = YES; + } else { + *stop = NO; + } + }]; + [workQueue enqueueWorkItem:workItem2]; + + MTRAsyncWorkItem * workItem3 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler3 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + [workItem3 endWork]; + }; + workItem3.readyHandler = readyHandler3; + [workItem3 setDuplicateTypeID:2 + handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { + if ([opaqueItemData isEqual:@(1)]) { + *isDuplicate = YES; + *stop = YES; + } else { + *stop = NO; + } + }]; + [workQueue enqueueWorkItem:workItem3]; + + // At this point we should have duplicate type 1 with data @(1) and @(2), and type 2 with data @(1). + XCTAssertTrue([workQueue isDuplicateForTypeID:1 workItemData:@(1)]); + XCTAssertTrue([workQueue isDuplicateForTypeID:1 workItemData:@(2)]); + XCTAssertTrue([workQueue isDuplicateForTypeID:2 workItemData:@(1)]); + + XCTAssertFalse([workQueue isDuplicateForTypeID:0 workItemData:@(1)]); + XCTAssertFalse([workQueue isDuplicateForTypeID:0 workItemData:@(2)]); + XCTAssertFalse([workQueue isDuplicateForTypeID:1 workItemData:@(0)]); + XCTAssertFalse([workQueue isDuplicateForTypeID:1 workItemData:@(3)]); + XCTAssertFalse([workQueue isDuplicateForTypeID:2 workItemData:@(2)]); + + // Test returning *isDuplicate=NO and queuing one extra duplicate item, and that the extra item runs + + // First have a regular item with ID/data == 3/1 + MTRAsyncWorkItem * workItem4 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler4 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + [workItem4 endWork]; + }; + workItem4.readyHandler = readyHandler4; + [workItem4 setDuplicateTypeID:3 + handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { + if ([opaqueItemData isEqual:@(1)]) { + *isDuplicate = YES; + *stop = YES; + } else { + *stop = NO; + } + }]; + [workQueue enqueueWorkItem:workItem4]; + + XCTAssertTrue([workQueue isDuplicateForTypeID:3 workItemData:@(1)]); + + // Have a barrier item with ID/data == 3/1 that returns *isDuplicate=NO + MTRAsyncWorkItem * workItem5 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler5 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + [workItem5 endWork]; + }; + workItem5.readyHandler = readyHandler5; + [workItem5 setDuplicateTypeID:3 + handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { + if ([opaqueItemData isEqual:@(1)]) { + *isDuplicate = NO; + *stop = YES; + } else { + *stop = NO; + } + }]; + [workQueue enqueueWorkItem:workItem5]; + + // After the above, the same ID/data should no longer be considered duplicate + XCTAssertFalse([workQueue isDuplicateForTypeID:3 workItemData:@(1)]); + + // Now add regular regular item with ID/data == 3/1 + MTRAsyncWorkItem * workItem6 = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; + MTRAsyncWorkReadyHandler readyHandler6 = ^(MTRDevice * _Nonnull device, NSUInteger retryCount) { + [workItem6 endWork]; + [workItem6ReadyExpectation fulfill]; + }; + workItem6.readyHandler = readyHandler6; + [workItem6 setDuplicateTypeID:3 + handler:^(id _Nonnull opaqueItemData, BOOL * _Nonnull isDuplicate, BOOL * stop) { + if ([opaqueItemData isEqual:@(1)]) { + *isDuplicate = YES; + *stop = YES; + } else { + *stop = NO; + } + }]; + [workQueue enqueueWorkItem:workItem6]; + + // After the above, the same ID/data should no longer be considered duplicate + XCTAssertTrue([workQueue isDuplicateForTypeID:3 workItemData:@(1)]); + + [workItem0 endWork]; + [workItem0ReadyExpectation fulfill]; + }; + workItem0.readyHandler = readyHandler0; + [workQueue enqueueWorkItem:workItem0]; + + [self waitForExpectations:@[ workItem0ReadyExpectation, workItem6ReadyExpectation ] timeout:5]; +} + +@end diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 3eda4201e349e9..400976afbc5339 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -122,6 +122,10 @@ 3D843717294979230070D20A /* MTRClusters_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D843715294979230070D20A /* MTRClusters_Internal.h */; }; 3D843756294AD25A0070D20A /* MTRCertificateInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D843754294AD25A0070D20A /* MTRCertificateInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3D843757294AD25A0070D20A /* MTRCertificateInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3D843755294AD25A0070D20A /* MTRCertificateInfo.mm */; }; + 3DA1A3542ABAB3B4004F0BB9 /* MTRAsyncWorkQueue_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DA1A3512ABAB3B4004F0BB9 /* MTRAsyncWorkQueue_Internal.h */; }; + 3DA1A3552ABAB3B4004F0BB9 /* MTRAsyncWorkQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DA1A3522ABAB3B4004F0BB9 /* MTRAsyncWorkQueue.h */; }; + 3DA1A3562ABAB3B4004F0BB9 /* MTRAsyncWorkQueue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3DA1A3532ABAB3B4004F0BB9 /* MTRAsyncWorkQueue.mm */; }; + 3DA1A3582ABABF6A004F0BB9 /* MTRAsyncWorkQueueTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DA1A3572ABABF69004F0BB9 /* MTRAsyncWorkQueueTests.m */; }; 3DECCB6E29347D2D00585AEC /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DECCB6D29347D2C00585AEC /* Security.framework */; }; 3DECCB702934AECD00585AEC /* MTRLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DECCB6F2934AC1C00585AEC /* MTRLogging.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3DECCB722934AFE200585AEC /* MTRLogging.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3DECCB712934AFE200585AEC /* MTRLogging.mm */; }; @@ -212,7 +216,6 @@ 7596A84828762783004DAE0E /* MTRAsyncCallbackWorkQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7596A84628762783004DAE0E /* MTRAsyncCallbackWorkQueue.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7596A84928762783004DAE0E /* MTRAsyncCallbackWorkQueue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7596A84728762783004DAE0E /* MTRAsyncCallbackWorkQueue.mm */; }; 7596A84B287636C1004DAE0E /* MTRDevice_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7596A84A287636C1004DAE0E /* MTRDevice_Internal.h */; }; - 7596A84D287782EF004DAE0E /* MTRAsyncCallbackWorkQueue_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7596A84C287782E8004DAE0E /* MTRAsyncCallbackWorkQueue_Internal.h */; }; 7596A84F2877E6A9004DAE0E /* MTRCluster_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7596A84E2877E6A9004DAE0E /* MTRCluster_Internal.h */; }; 7596A8512878709F004DAE0E /* MTRAsyncCallbackQueueTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7596A8502878709F004DAE0E /* MTRAsyncCallbackQueueTests.m */; }; 7596A85528788557004DAE0E /* MTRClusters.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7596A85228788557004DAE0E /* MTRClusters.mm */; }; @@ -473,6 +476,10 @@ 3D84372F294984AF0070D20A /* command_completion_type.zapt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = command_completion_type.zapt; sourceTree = ""; }; 3D843754294AD25A0070D20A /* MTRCertificateInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRCertificateInfo.h; sourceTree = ""; }; 3D843755294AD25A0070D20A /* MTRCertificateInfo.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCertificateInfo.mm; sourceTree = ""; }; + 3DA1A3512ABAB3B4004F0BB9 /* MTRAsyncWorkQueue_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRAsyncWorkQueue_Internal.h; sourceTree = ""; }; + 3DA1A3522ABAB3B4004F0BB9 /* MTRAsyncWorkQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRAsyncWorkQueue.h; sourceTree = ""; }; + 3DA1A3532ABAB3B4004F0BB9 /* MTRAsyncWorkQueue.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRAsyncWorkQueue.mm; sourceTree = ""; }; + 3DA1A3572ABABF69004F0BB9 /* MTRAsyncWorkQueueTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRAsyncWorkQueueTests.m; sourceTree = ""; }; 3DECCB6D29347D2C00585AEC /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; 3DECCB6F2934AC1C00585AEC /* MTRLogging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRLogging.h; sourceTree = ""; }; 3DECCB712934AFE200585AEC /* MTRLogging.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRLogging.mm; sourceTree = ""; }; @@ -568,7 +575,6 @@ 7596A84628762783004DAE0E /* MTRAsyncCallbackWorkQueue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRAsyncCallbackWorkQueue.h; sourceTree = ""; }; 7596A84728762783004DAE0E /* MTRAsyncCallbackWorkQueue.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRAsyncCallbackWorkQueue.mm; sourceTree = ""; }; 7596A84A287636C1004DAE0E /* MTRDevice_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDevice_Internal.h; sourceTree = ""; }; - 7596A84C287782E8004DAE0E /* MTRAsyncCallbackWorkQueue_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRAsyncCallbackWorkQueue_Internal.h; sourceTree = ""; }; 7596A84E2877E6A9004DAE0E /* MTRCluster_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRCluster_Internal.h; sourceTree = ""; }; 7596A8502878709F004DAE0E /* MTRAsyncCallbackQueueTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRAsyncCallbackQueueTests.m; sourceTree = ""; }; 7596A85228788557004DAE0E /* MTRClusters.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRClusters.mm; sourceTree = ""; }; @@ -1092,8 +1098,10 @@ B20252912459E34F00F97062 /* Info.plist */, B2E0D7A8245B0B5C003C5B48 /* Matter.h */, 7596A84628762783004DAE0E /* MTRAsyncCallbackWorkQueue.h */, - 7596A84C287782E8004DAE0E /* MTRAsyncCallbackWorkQueue_Internal.h */, 7596A84728762783004DAE0E /* MTRAsyncCallbackWorkQueue.mm */, + 3DA1A3522ABAB3B4004F0BB9 /* MTRAsyncWorkQueue.h */, + 3DA1A3512ABAB3B4004F0BB9 /* MTRAsyncWorkQueue_Internal.h */, + 3DA1A3532ABAB3B4004F0BB9 /* MTRAsyncWorkQueue.mm */, 3CF134AA289D8DF70017A19E /* MTRDeviceAttestationInfo.h */, 3CF134AC289D8E570017A19E /* MTRDeviceAttestationInfo.mm */, 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */, @@ -1229,6 +1237,7 @@ 997DED1926955D0200975E97 /* MTRThreadOperationalDatasetTests.mm */, 517BF3F2282B62CB00A8B7DB /* MTRCertificateTests.m */, 7596A8502878709F004DAE0E /* MTRAsyncCallbackQueueTests.m */, + 3DA1A3572ABABF69004F0BB9 /* MTRAsyncWorkQueueTests.m */, 51669AEF2913204400F4AA36 /* MTRBackwardsCompatTests.m */, 510CECA6297F72470064E0B3 /* MTROperationalCertificateIssuerTests.m */, 5173A47829C0E82300F67F48 /* MTRFabricInfoTests.m */, @@ -1397,6 +1406,7 @@ 515C1C70284F9FFB00A48F0C /* MTRFramework.h in Headers */, 7534F12928BFF20300390851 /* MTRDeviceAttestationDelegate_Internal.h in Headers */, D4772A46285AE98400383630 /* MTRClusterConstants.h in Headers */, + 3DA1A3552ABAB3B4004F0BB9 /* MTRAsyncWorkQueue.h in Headers */, B289D4212639C0D300D4E314 /* MTROnboardingPayloadParser.h in Headers */, 513DDB862761F69300DAA01A /* MTRAttributeTLVValueDecoder_Internal.h in Headers */, 2CB7163F252F731E0026E2BB /* MTRDeviceControllerDelegate.h in Headers */, @@ -1415,7 +1425,6 @@ 7596A84428762729004DAE0E /* MTRDevice.h in Headers */, B2E0D7B8245B0B5C003C5B48 /* MTRSetupPayload.h in Headers */, 1E4D654F29C208DD00BC3478 /* MTRCommissionableBrowser.h in Headers */, - 7596A84D287782EF004DAE0E /* MTRAsyncCallbackWorkQueue_Internal.h in Headers */, 3D843756294AD25A0070D20A /* MTRCertificateInfo.h in Headers */, 7596A83E28751220004DAE0E /* MTRBaseClusters_Internal.h in Headers */, 997DED182695344800975E97 /* MTRThreadOperationalDataset.h in Headers */, @@ -1450,6 +1459,7 @@ 51565CB12A7AD77600469F18 /* MTRDeviceControllerDataStore.h in Headers */, 3D843713294977000070D20A /* NSDataSpanConversion.h in Headers */, 991DC08B247704DC00C13860 /* MTRLogging_Internal.h in Headers */, + 3DA1A3542ABAB3B4004F0BB9 /* MTRAsyncWorkQueue_Internal.h in Headers */, 1E4D655029C208DD00BC3478 /* MTRCommissionableBrowserDelegate.h in Headers */, 7596A84828762783004DAE0E /* MTRAsyncCallbackWorkQueue.h in Headers */, 5A7947E527C0129F00434CF2 /* MTRDeviceController+XPC.h in Headers */, @@ -1741,6 +1751,7 @@ 5A6FEC9827B5C6AF00F25F42 /* MTRDeviceOverXPC.mm in Sources */, 514654492A72F9DF00904E61 /* MTRDemuxingStorage.mm in Sources */, 1E4D655229C30A8700BC3478 /* MTRCommissionableBrowser.mm in Sources */, + 3DA1A3562ABAB3B4004F0BB9 /* MTRAsyncWorkQueue.mm in Sources */, 3DECCB722934AFE200585AEC /* MTRLogging.mm in Sources */, 7596A84528762729004DAE0E /* MTRDevice.mm in Sources */, ); @@ -1767,6 +1778,7 @@ 5173A47929C0E82300F67F48 /* MTRFabricInfoTests.m in Sources */, 5143851E2A65885500EDC8E6 /* MTRSwiftPairingTests.swift in Sources */, 3D0C484B29DA4FA0006D811F /* MTRErrorTests.m in Sources */, + 3DA1A3582ABABF6A004F0BB9 /* MTRAsyncWorkQueueTests.m in Sources */, 51742B4A29CB5FC1009974FE /* MTRTestResetCommissioneeHelper.m in Sources */, 5AE6D4E427A99041001F2493 /* MTRDeviceTests.m in Sources */, 510CECA8297F72970064E0B3 /* MTROperationalCertificateIssuerTests.m in Sources */, @@ -1813,9 +1825,9 @@ CHIP_HAVE_CONFIG_H, "CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=", CONFIG_BUILD_FOR_HOST_UNIT_TEST, - CONFIG_USE_LOCAL_STORAGE, "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1", "CONFIG_USE_INTERACTIVE_MODE=1", + "CHIP_DISABLE_PLATFORM_KVS=1", ); "HEADER_SEARCH_PATHS[arch=*]" = ( "$(CHIP_ROOT)/examples/darwin-framework-tool", @@ -1883,9 +1895,9 @@ CHIP_HAVE_CONFIG_H, "CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=", CONFIG_BUILD_FOR_HOST_UNIT_TEST, - CONFIG_USE_LOCAL_STORAGE, "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1", "CONFIG_USE_INTERACTIVE_MODE=1", + "CHIP_DISABLE_PLATFORM_KVS=1", ); "HEADER_SEARCH_PATHS[arch=*]" = ( "$(CHIP_ROOT)/examples//darwin-framework-tool", @@ -1973,7 +1985,6 @@ CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1996,7 +2007,7 @@ OTHER_LDFLAGS = "-Wl,-unexported_symbol,\"__Z*\""; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos appletvos appletvsimulator watchos watchsimulator"; - SUPPORTS_TEXT_BASED_API = YES; + SUPPORTS_TEXT_BASED_API = NO; TARGETED_DEVICE_FAMILY = "1,2,3,4"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; diff --git a/src/messaging/README.md b/src/messaging/README.md index af5357e5dece2f..bfb379e22aa49c 100644 --- a/src/messaging/README.md +++ b/src/messaging/README.md @@ -16,7 +16,7 @@ will be expanded are denoted with `$` . Unless specified, numerical values are represented in decimal notation. ``` -<<< [E:$exchange_id S:$session_id M:$msg_id (Ack: $ack_msg_id)] ($msg_category) Msg TX to $fabric_index:$destination [$compressed_fabric_id] --- Type $protocol_id:$msg_type ($protocol_name:$msg_type_name) +<<< [E:$exchange_id S:$session_id M:$msg_id (Ack: $ack_msg_id)] ($msg_category) Msg TX to $fabric_index:$destination [$compressed_fabric_id] [$peer_address] --- Type $protocol_id:$msg_type ($protocol_name:$msg_type_name) ``` | Field | Description | @@ -29,6 +29,7 @@ Unless specified, numerical values are represented in decimal notation. | fabric_index | Fabric index on the sending side | | destination | 64-bit Node Identifier that can represent both group, operational and temporary node identifiers depending on `$msg_category` (in hex) | | compressed_fabric_id | If present and valid, lower 16-bits of the compressed fabric ID (in hex). Otherwise, it will be set to 0000. | +| peer_address | The peer address (IP and port) for the session | | protocol_id | 16-bit Protocol ID within the common vendor namespace (in hex) | | msg_type | 8-bit message type ID (in hex) | | protocol_name | If available, a logical name for the protocol | diff --git a/src/platform/telink/BUILD.gn b/src/platform/telink/BUILD.gn index 00fe34e81093bc..9864ae4b5dfd09 100644 --- a/src/platform/telink/BUILD.gn +++ b/src/platform/telink/BUILD.gn @@ -43,7 +43,6 @@ static_library("telink") { "ConfigurationManagerImpl.h", "ConnectivityManagerImpl.cpp", "ConnectivityManagerImpl.h", - "ICDUtil.cpp", "InetPlatformConfig.h", "KeyValueStoreManagerImpl.h", "PlatformManagerImpl.h", diff --git a/src/platform/telink/ICDUtil.cpp b/src/platform/telink/ICDUtil.cpp deleted file mode 100644 index b3dc9c80bbc9dd..00000000000000 --- a/src/platform/telink/ICDUtil.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "ICDUtil.h" - -ICDUtil ICDUtil::sICDUtil; - -CHIP_ERROR ICDUtil::OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, chip::Transport::SecureSession & aSecureSession) -{ - uint16_t agreedMaxInterval = CONFIG_CHIP_MAX_PREFERRED_SUBSCRIPTION_REPORT_INTERVAL; - uint16_t requestedMinInterval = 0; - uint16_t requestedMaxInterval = 0; - aReadHandler.GetReportingIntervals(requestedMinInterval, requestedMaxInterval); - - if (requestedMaxInterval > agreedMaxInterval) - { - agreedMaxInterval = requestedMaxInterval; - } - else if (agreedMaxInterval > kSubscriptionMaxIntervalPublisherLimit) - { - agreedMaxInterval = kSubscriptionMaxIntervalPublisherLimit; - } - - return aReadHandler.SetMaxReportingInterval(agreedMaxInterval); -} diff --git a/src/platform/telink/ICDUtil.h b/src/platform/telink/ICDUtil.h deleted file mode 100644 index 33db1e97a051ac..00000000000000 --- a/src/platform/telink/ICDUtil.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -class ICDUtil : public chip::app::ReadHandler::ApplicationCallback -{ - CHIP_ERROR OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, - chip::Transport::SecureSession & aSecureSession) override; - friend ICDUtil & GetICDUtil(); - static ICDUtil sICDUtil; -}; - -inline ICDUtil & GetICDUtil() -{ - return ICDUtil::sICDUtil; -} diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index c2041446ab9be9..63e08822c2343c 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -162,6 +162,8 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P FabricIndex fabricIndex; #endif // CHIP_PROGRESS_LOGGING + PeerAddress destination_address; + switch (sessionHandle->GetSessionType()) { case Transport::Session::SessionType::kGroupOutgoing: { @@ -184,7 +186,7 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P return CHIP_ERROR_INTERNAL; } - PeerAddress destination_address = Transport::PeerAddress::Multicast(fabric->GetFabricId(), groupSession->GetGroupId()); + destination_address = Transport::PeerAddress::Multicast(fabric->GetFabricId(), groupSession->GetGroupId()); // Trace before any encryption MATTER_LOG_MESSAGE_SEND(chip::Tracing::OutgoingMessageType::kGroupMessage, &payloadHeader, &packetHeader, @@ -224,7 +226,7 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P .SetSessionId(session->GetPeerSessionId()) // .SetSessionType(Header::SessionType::kUnicastSession); - PeerAddress destination_address = session->GetPeerAddress(); + destination_address = session->GetPeerAddress(); // Trace before any encryption MATTER_LOG_MESSAGE_SEND(chip::Tracing::OutgoingMessageType::kSecureSession, &payloadHeader, &packetHeader, @@ -259,8 +261,8 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P break; } - auto unauthenticated = sessionHandle->AsUnauthenticatedSession(); - PeerAddress destination_address = unauthenticated->GetPeerAddress(); + auto unauthenticated = sessionHandle->AsUnauthenticatedSession(); + destination_address = unauthenticated->GetPeerAddress(); // Trace after all headers are settled. MATTER_LOG_MESSAGE_SEND(chip::Tracing::OutgoingMessageType::kUnauthenticated, &payloadHeader, &packetHeader, @@ -304,16 +306,24 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P snprintf(ackBuf, sizeof(ackBuf), " (Ack:" ChipLogFormatMessageCounter ")", payloadHeader.GetAckMessageCounter().Value()); } + char addressStr[Transport::PeerAddress::kMaxToStringSize] = { 0 }; + destination_address.ToString(addressStr); + + // Work around pigweed not allowing more than 14 format args in a log + // message when using tokenized logs. + char typeStr[4 + 1 + 2 + 1]; + snprintf(typeStr, sizeof(typeStr), "%04X:%02X", payloadHeader.GetProtocolID().GetProtocolId(), payloadHeader.GetMessageType()); + // // Legend that can be used to decode this log line can be found in messaging/README.md // ChipLogProgress(ExchangeManager, "<<< [E:" ChipLogFormatExchangeId " S:%u M:" ChipLogFormatMessageCounter - "%s] (%s) Msg TX to %u:" ChipLogFormatX64 " [%04X] --- Type %04X:%02X (%s:%s)", + "%s] (%s) Msg TX to %u:" ChipLogFormatX64 " [%04X] [%s] --- Type %s (%s:%s)", ChipLogValueExchangeIdFromSentHeader(payloadHeader), sessionHandle->SessionIdForLogging(), packetHeader.GetMessageCounter(), ackBuf, Transport::GetSessionTypeString(sessionHandle), fabricIndex, - ChipLogValueX64(destination), static_cast(compressedFabricId), - payloadHeader.GetProtocolID().GetProtocolId(), payloadHeader.GetMessageType(), protocolName, msgTypeName); + ChipLogValueX64(destination), static_cast(compressedFabricId), addressStr, typeStr, protocolName, + msgTypeName); #endif ReturnErrorOnFailure(packetHeader.EncodeBeforeData(message)); @@ -341,11 +351,6 @@ CHIP_ERROR SessionManager::SendPreparedMessage(const SessionHandle & sessionHand multicastAddress = Transport::PeerAddress::Multicast(fabric->GetFabricId(), groupSession->GetGroupId()); destination = &multicastAddress; - char addressStr[Transport::PeerAddress::kMaxToStringSize]; - multicastAddress.ToString(addressStr, Transport::PeerAddress::kMaxToStringSize); - - ChipLogProgress(Inet, "(G) Sending msg " ChipLogFormatMessageCounter " to Multicast IPV6 address '%s'", - preparedMessage.GetMessageCounter(), addressStr); } break; case Transport::Session::SessionType::kSecure: { @@ -356,23 +361,12 @@ CHIP_ERROR SessionManager::SendPreparedMessage(const SessionHandle & sessionHand secure->MarkActive(); destination = &secure->GetPeerAddress(); - - ChipLogProgress(Inet, "(S) Sending msg " ChipLogFormatMessageCounter " on secure session with LSID: %u", - preparedMessage.GetMessageCounter(), secure->GetLocalSessionId()); } break; case Transport::Session::SessionType::kUnauthenticated: { auto unauthenticated = sessionHandle->AsUnauthenticatedSession(); unauthenticated->MarkActive(); destination = &unauthenticated->GetPeerAddress(); - -#if CHIP_PROGRESS_LOGGING - char addressStr[Transport::PeerAddress::kMaxToStringSize]; - destination->ToString(addressStr); - - ChipLogProgress(Inet, "(U) Sending msg " ChipLogFormatMessageCounter " to IP address '%s'", - preparedMessage.GetMessageCounter(), addressStr); -#endif } break; default: diff --git a/third_party/java_deps/BUILD.gn b/third_party/java_deps/BUILD.gn index 58260d6d84ceb5..f71ab3702d2a91 100644 --- a/third_party/java_deps/BUILD.gn +++ b/third_party/java_deps/BUILD.gn @@ -26,11 +26,15 @@ java_prebuilt("json") { } java_prebuilt("kotlin-stdlib") { - jar_path = "artifacts/kotlin-stdlib-1.8.10.jar" + jar_path = "artifacts/kotlin-stdlib-1.8.20.jar" } java_prebuilt("kotlin-test") { - jar_path = "artifacts/kotlin-test-1.8.10.jar" + jar_path = "artifacts/kotlin-test-1.8.20.jar" +} + +java_prebuilt("kotlinx-coroutines-core-jvm") { + jar_path = "artifacts/kotlinx-coroutines-core-jvm-1.7.3.jar" } java_prebuilt("protobuf-java") { diff --git a/third_party/java_deps/set_up_java_deps.sh b/third_party/java_deps/set_up_java_deps.sh index e96e48d02e648c..b70438df77b129 100755 --- a/third_party/java_deps/set_up_java_deps.sh +++ b/third_party/java_deps/set_up_java_deps.sh @@ -37,8 +37,9 @@ download_jar "repo1.maven.org" "com/google/code/gson/gson/2.9.1" "gson-2.9.1.jar download_jar "repo1.maven.org" "com/google/protobuf/protobuf-java/3.22.0" "protobuf-java-3.22.0.jar" download_jar "repo1.maven.org" "com/google/truth/truth/1.1.3" "truth-1.1.3.jar" download_jar "repo1.maven.org" "junit/junit/4.13.2" "junit-4.13.2.jar" -download_jar "repo1.maven.org" "org/jetbrains/kotlin/kotlin-stdlib/1.8.10" "kotlin-stdlib-1.8.10.jar" -download_jar "repo1.maven.org" "org/jetbrains/kotlin/kotlin-test/1.8.10" "kotlin-test-1.8.10.jar" +download_jar "repo1.maven.org" "org/jetbrains/kotlin/kotlin-stdlib/1.8.20" "kotlin-stdlib-1.8.20.jar" +download_jar "repo1.maven.org" "org/jetbrains/kotlin/kotlin-test/1.8.20" "kotlin-test-1.8.20.jar" +download_jar "repo1.maven.org" "org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/1.7.3" "kotlinx-coroutines-core-jvm-1.7.3.jar" download_jar "repo1.maven.org" "org/json/json/20220924" "json-20220924.jar" # Unit test requirements